With Cron, you can program tasks (sometimes referred to as “cron jobs”) to execute automatically at predetermined intervals. Cron determines which commands to run based on the tasks you have configured to run.
Here is the Cron expression to run a job at 2 AM daily
0 2 * * *
Explanation of the crown expression:
There are five fields in this line, each of which represents a different element of the schedule:
- The minutes are represented by the first field, (0). (0-59)
- The hours are represented by the second field (2). (0-23)
- The third field (*) denotes the month’s day (1-31)
- The month is indicated by the fourth field (*). (1-12)
- The day of the week is indicated by the fifth field (*). (0-7, where both 0 and 7 represent Sunday)