【发布时间】:2018-09-24 16:23:00
【问题描述】:
我有一个 php 脚本,我需要每 4 秒运行一次,每天运行一小时,最好的方法是什么。我查找了一种使用 cron 和 sleep 的方法,也观看了,但是总体而言,最好的方法是什么?
观看
watch -n10 command args
cron:
* * * * * /foo/bar/your_script
* * * * * sleep 4; /foo/bar/your_script
* * * * * sleep 8; /foo/bar/your_script
* * * * * sleep 12; /foo/bar/your_script
【问题讨论】:
标签: linux