Files
public-setupfiles/cron-job-setup-files/cronjob-setup.sh
T

13 lines
399 B
Bash
Raw Normal View History

2023-12-16 19:03:50 -06:00
# Update Apt-cache
sudo apt-get update
# install needed packages
2023-12-17 14:24:08 -06:00
sudo apt install python3 cron cron-apt crontab python3-crontab -y
2023-12-16 19:03:50 -06:00
# enable system services
sudo systemctl enable cron
sudo systemctl start cron
# Echo the command below into the file /etc/crontab
echo 'MAILTO="alert@tyates.one"
2024-05-30 15:30:31 -05:00
0 */6 * * * root /home/traver/public-setupfiles/updates_scripts/updates.sh' | sudo tee -a /etc/crontab