cron
is a Linux utility that lets you schedule scripts or commands to run automatically at specified times or intervals.
* * * * * command_to_run
│ │ │ │ │
│ │ │ │ └─ day of week (0 - 7) (Sunday=0 or 7)
│ │ │ └── month (1 - 12)
│ │ └─── day of month (1 - 31)
│ └──── hour (0 - 23)
└───── minute (0 - 59)
0 7 * * * /home/user/backup.sh
# Runs backup.sh every day at 7:00 AM
Enter a cron schedule (e.g. 0 12 * * 1
) and see what it means:
crontab -e
to edit your crontab and schedule your jobs!