1. What is cron
1.1 Introduction to cron
cron: Scheduled tasks, in fact
定时任务
.
Make an appointment with the system and run a task (job) at a few minutes, a few seconds or every once in a while, it's that simple.
1.2 cron detailed syntax
- structure
The following structure comes from 维基百科
:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │ 7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * *