Crontab 语法
* * * * * command
分(00-59) 时(00-23) 日(01-30) 月(01-12) 周(0-6)
- 每10秒执行
* * * * * sleep 10; echo 'hello' >> /tmp/crontab_test
* * * * * sleep 20; echo 'hello' >> /tmp/crontab_test
* * * * * sleep 30; echo 'hello' >> /tmp/crontab_test
* * * * * sleep 40; echo 'hello' >> /tmp/crontab_test
* * * * * sleep 50; echo 'hello' >> /tmp/crontab_test
* * * * * sleep 60; echo 'hello' >> /tmp/crontab_test
- 每10分钟
*/10 * * * * echo 'hello' >> /tmp/crontab_test
- 在每天的0点到7点间,每10分钟执行
*/10 0-7 * * *
* 0-7/2 * * * # 表示在0点到7点期间每两小时执行一次
- 每45分钟
0 */3 * * * echo `date` >>