Add Install_Cron.sh
This commit is contained in:
22
Install_Cron.sh
Normal file
22
Install_Cron.sh
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user