一、编写Shell脚本crontab.sh
=1
$(PHP '/home/www/PHP/crontab/crontab.PHP'<span style="color: #000000">)
<span style="color: #008080">sleep <span style="color: #800080">$step
<span style="color: #0000ff">done
<span style="color: #0000ff">for
(( i = 0; i < 60; i=(i+step) )); <span style="color: #0000ff">do<span style="color: #000000">$(PHP '/home/www/PHP/crontab/crontab.PHP'<span style="color: #000000">)
<span style="color: #008080">sleep <span style="color: #800080">$step
<span style="color: #0000ff">done
<span style="color: #0000ff">exit 0
二、crontab -e 输入以下语句,然后:wq 保存退出
* * * * * /home/www/PHP/crontab/crontab.sh