crontab
Step 1: Open the Crontab Editor
crontab -eStep 2: Understand the Crontab Syntax
* * * * * command_to_run
| | | | |
| | | | βββ Day of the week (0 - 7) [Sunday = 0 or 7]
| | | βββββ Month (1 - 12)
| | βββββββ Day of the month (1 - 31)
| βββββββββ Hour (0 - 23)
βββββββββββ Minute (0 - 59)0 12 * * * /path/to/script.shStep 3: Add a Cron Job
Step 4: Save and Exit
Step 5: Verify Your Crontab
Step 6: Check Cron Logs (Optional)
Example Crontab Entries
Schedule
Cron Expression
Meaning
Last updated