Skip to content

Crontab#

Cron is most suitable for scheduling repetitive tasks. In Package Manager we use the format to setup the sync, eviction, usage schedules and more.

Format#

The crontab format is a string that consists of five characters. For example:

Min  Hour Day  Mon  Weekday
*    *    *    *    *  # command to be executed
┬    ┬    ┬    ┬    ┬
│    │    │    │    └─  Weekday  (0=Sun .. 6=Sat)
│    │    │    └──────  Month    (1..12)
│    │    └───────────  Day      (1..31)
│    └────────────────  Hour     (0..23)
└─────────────────────  Minute   (0..59)

Examples#

Example Description
0 * * * * every hour
*/15 * * * * every 15 mins
0 */2 * * * every 2 hours
0 0 * * 0 every Sunday midnight
0 0 1 * * every first day of the month at midnight