linux下设置 crontab 每分钟、每小时、每天、每周、每月、每年定时执行

每五分钟执行 */5 * * * *

每小时执行 0 * * * *

每天执行 0 0 * * *

每周执行 0 0 * * 0

每月执行 0 0 1 * *

每年执行 0 0 1 1 *

Python
<br />Linux * * * * * * - - - - - - | | | | | | | | | | | + year [optional] | | | | +----- day of week (0 - 7) (Sunday=0 or 7) | | | +---------- month (1 - 12) | | +--------------- day of month (1 - 31) | +-------------------- hour (0 - 23) +------------------------- min (0 - 59)
1
2
3
4
5
6
7
8
9
10
11
<br />Linux
*    *    *    *    *    *
-    -    -    -    -    -
|    |    |    |    |    |
|    |    |    |    |    + year [optional]
|    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)
|    |    |    +---------- month (1 - 12)
|    |    +--------------- day of month (1 - 31)
|    +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)
 
linux下设置 crontab 每分钟、每小时、每天、每周、每月、每年定时执行

下面附上一个在线工具:http://tool.lu/crontab

linux下设置 crontab 每分钟、每小时、每天、每周、每月、每年定时执行

工具推荐

https://crontab.guru/

linux下设置 crontab 每分钟、每小时、每天、每周、每月、每年定时执行

linux下设置 crontab 每分钟、每小时、每天、每周、每月、每年定时执行