以上为crontab下要执行的文件 这里面的.sh文件可以执行更细小时间的定时任务,crontab里面最小的时间是每分钟。
#!/bin/bash
for (( i = 0; i < 60; i=(i+1) ));
do
$(/usr/local/php72/bin/php /www/superpasture/public/index.php /index/plan/checkPay)
$(/usr/local/php72/bin/php /www/superpasture/public/index.php /index/plan/checkConfirm)
$(/usr/local/php72/bin/php /www/superpasture/public/index.php /index/plan/autoCancel)
$(/usr/local/php72/bin/php /www/superpasture/public/index.php /index/plan/autoConfirm)
sleep 1
done
exit 0