59
crontab does not understand "intervals", it only understands "schedule"
crontab不理解“间隔”,它只理解“schedule”
valid hours: 0-23 -- valid minutes: 0-59
有效时间:0-23——有效时间:0-59
example #1
示例# 1
30 * * * * your_command
你的命令
this means "run when the minute of each hour is 30" (would run at: 1:30, 2:30, 3:30, etc)
这句话的意思是“在每小时的一分钟是30的时候跑步”(在1点30分、2点30分、3点30分等等)
example #2
例# 2
*/30 * * * * your_command
* * * * *你的命令
this means "run when the minute of each hour is evenly divisible by 30" (would run at: 1:30, 2:00, 2:30, 3:00, etc)
这意味着“每小时的一分钟被30整除时跑步”(跑步时间为:1:30,2:00,2:30,3:00,等等)
example #3
示例# 3
0,30 * * * * your_command
0,30 * * * * your_command
this means "run when the minute of each hour is 0 or 30" (would run at: 1:30, 2:00, 2:30, 3:00, etc)
这意味着“在每小时的一分钟为0或30时跑步”(跑步时间为:1:30、2:00、2:30、3:00等)
it's another way to accomplish the same results as example #2
这是实现与示例#2相同结果的另一种方法
example #4
示例# 4
19 * * * * your_command
你的命令
this means "run when the minute of each hour is 19" (would run at: 1:19, 2:19, 3:19, etc)
这句话的意思是“当每小时的一分钟是19的时候跑步”(跑步时间是:1点19分,2点19分,3点19分,等等)
example #5
例# 5
*/19 * * * * your_command
你的命令
this means "run when the minute of each hour is evenly divisible by 19" (would run at: 1:19, 1:38, 1:57, 2:19, 2:38, 2:57 etc)
这意味着“当每小时的一分钟被19整除时,跑步”(跑步时间为:1:19,1:38,1:57,2:19,2:38,2:57等等)
note: several refinements have been made to this post by various users including the author
注意:包括作者在内的不同用户对这篇文章做了一些改进