#1282: Crontab syntax for periodic tasks

Отредактирована: 102 дня назад

Actions based on a schedule and the periodic ticket re-balancing use crontab syntax to form a schedule for periodic tasks. This article provides a brief overview of the crontab format.

Format of entry

  * * * * *
# | | | | |
# | | | | day of the week (0–6) (Sunday to Saturday; 
# | | | month (1–12)             7 is also Sunday on some systems)
# | | day of the month (1–31)
# | hour (0–23)
# minute (0–59)

You can also check the syntax or find a suitable one using specialized services, such as crontab.guru.

Examples

Run the action once every three minutes:

*/3 * * * *

Run the action every hour at XX:13:

13 * * * *

Run every Sunday at 7:00:

0 7 * * 0

Run at 6:30, 12:30 and 18:30 every day:

30 6,12,18 * * *