[ ad placement ]
Cron Expression Syntax
A standard cron expression has five fields separated by spaces:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, Sun=0 or 7)
│ │ │ │ │
* * * * *
Special Characters
Each field supports these special characters:
*— matches every value (wildcard),— list separator (e.g.1,15= 1st and 15th)-— range (e.g.1-5= Monday through Friday)/— step (e.g.*/5= every 5 units)
Tips
Most cron implementations run in the server's local timezone. If your server is set to UTC, plan your schedules accordingly. Use timedatectl to check your server's timezone on Linux.
Edit your crontab with crontab -e. List current entries with crontab -l. Always test new entries on a short interval first before setting the real schedule.
[ ad placement ]