crontab -l 显示定时任务内容
crontab -e编辑定时任务内容
查看crontab服务状态:
service crond status
手动启动crontab服务:
service crond start
定时访问某个地址实例:
# .---------------- minute (0 - 59) 分
# | .------------- hour (0 - 23) 小时
# | | .---------- day of month (1 - 31) 天
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... 月
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat 每周几
# | | | | |
# * * * * * user-name command to be executed
#下面是每三分钟访问下该网址
*/3 * * * * curl http://www.wowobao.com/taocan/show-166.html
#下面是每到1点10分访问下该网址
10 1 * * * curl http://www.wowobao.com/taocan/show-166.html
本文详细介绍了如何使用CronTab进行定时任务的配置,包括显示和编辑定时任务的方法,以及通过具体实例展示了如何设置定时访问特定网址的CronTab表达式。此外,还提供了检查CronTab服务状态和手动启动服务的命令。
6878

被折叠的 条评论
为什么被折叠?



