๐ Common Cron Job Examples
โ Every Minute
* * * * * /path/to/command.sh
โ Every 5 Minutes
*/5 * * * * /path/to/command.sh
โ Every Hour (at minute 0)
0 * * * * /path/to/command.sh
โ Every Day at 2:00 AM
0 2 * * * /path/to/backup.sh
โ Every Sunday at Midnight
0 0 * * 0 /path/to/script.sh
โ Every 1st Day of the Month at 1:30 AM
30 1 1 * * /path/to/monthly-report.sh
โ Every Weekday (MonโFri) at 6:00 PM
0 18 * * 1-5 /path/to/script.sh
โ Reboot Cron Job (Runs once at system startup)
@reboot /path/to/startup-script.sh
๐ Permissions Reminder
Make sure all scripts are executable:
chmod +x /path/to/script.sh
And verify paths used in your scripts (like mysql
, php
, etc.) using which
:
which php
which mysql