diff --git a/Install_Cron.sh b/Install_Cron.sh new file mode 100644 index 0000000..a467091 --- /dev/null +++ b/Install_Cron.sh @@ -0,0 +1,22 @@ +#!/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" \ No newline at end of file