宝塔上加shell定时任务

 

 脚本内容:

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=5
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 'api.xiaowei.test.com/PayNotify/anchang'
echo "----------------------------------------------------------------------------"
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
echo "----------------------------------------------------------------------------"
sleep $step
done
exit 0

  定时任务用url

 

posted on 2022-12-28 15:20  kevin_yang123  阅读(401)  评论(0编辑  收藏  举报