crontab 是Linux中配置定时任务的工具,在各种配置中,我们经常会看到除号(Slash)的使用,那么这个除号到底标示什么意思,使用中有哪些需要注意的地方呢?...在定时任务中,我们经常有这样的需求,比如每5分钟查看一下日志,我们可以这么写:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /command
这样肯定是没有问题的...*/13 * * * * /command
这里就是需要注意的地方。有一些步长是无法用这种方式表达的。...参考资料:
1、What's the meaning of slash in crontab
2、Man 5 crontab
3、Wiki Cron
4、StackOverflow Cron Syntax...Query
5、What does the slash in crontab actually do?