宝塔定时任务按秒执行

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=3#间隔的秒数,不能大于60
for (( i = 0; i < 60; i=(i+step) )); do
php /www/wwwroot/paotui.xcx-saas.com/think cancel_order

echo "----------------------------------------------------------------------------"
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
echo "----------------------------------------------------------------------------"
sleep $step
done
exit 0

你可能感兴趣的:(linux,ssh)