crontab - LINUX计划任务如何实现工作时间内1小时执行一次?工作时间外两小时执行一次
PHP中文网
PHP中文网 2017-04-17 13:59:02
0
3
982

工作时间内:09:00 - 17:00 一小时执行一次
工作时间外:18:00 - 08:00 两小时执行一次
周六,周日全天都是非工作时间

这个用crontab能否实现?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
黄舟
# 工作时间内
* 9-17/1 * * 1,2,3,4,5 /path/to/your/script 
# 工作时间外
* 18-8/2 * * 6,0    /path/to/your/script
伊谢尔伦

* 9-17/1 * * 1,2,3,4,5 /etc/init.d/yourcmd yourcmdparam
* 18-8/2 * * 1,2,3,4,5 /etc/init.d/yourcmd yourcmdparam
* */2 * * 6,0 /etc/init.d/yourcmd yourcmdparam

大家讲道理

Link
should be OK, see the link above

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!