Skip to content

CronJob

Furkan Güngör edited this page Jun 12, 2021 · 2 revisions

What is Cron Job?

Cron is a program used to repeat a task on a system. A task assignment is a cron job if it does not command a repeat as a whole.

How does a cron job work?

If you want to schedule a task once at a later time, you can use another command like it. But for repetitive tasks, cron is a great solution.

                                       Allowed values    Allowed special characters   Comment

┌───────────── second (optional)       0-59              * , - /                      
│ ┌───────────── minute                0-59              * , - /                      
│ │ ┌───────────── hour                0-23              * , - /                      
│ │ │ ┌───────────── day of month      1-31              * , - / L W ?                
│ │ │ │ ┌───────────── month           1-12 or JAN-DEC   * , - /                      
│ │ │ │ │ ┌───────────── day of week   0-6  or SUN-SAT   * , - / # L ?                Both 0 and 7 means SUN
│ │ │ │ │ │
* * * * * *
Clone this wiki locally