#!/bin/bash # Ensure parent directory exists mkdir -p /etc/cron.d # Target cron file TARGET="/etc/cron.d/change_pve_task_history_size" # Write cron contents cat << 'EOF' > "$TARGET" # Cron job for updating Proxmox task history size # /etc/cron.d/change_pve_task_history_size @reboot root /etc/cronscripts/change_pve_task_history_size/update_pve_max_task_history_size.sh 0 * * * * root /etc/cronscripts/change_pve_task_history_size/update_pve_max_task_history_size.sh EOF # Correct permissions for cron.d files chmod 644 "$TARGET" echo "Cron file created at $TARGET"