Date: 2022-06-09 12:16:03, Hit: 104

宝塔计划任务 选择 Shell脚本 N分钟 1分钟

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=5
for (( i = 0; i < 59; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 59 'http://127.0.0.1'
echo "--------------------------------------------------"
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "[$endDate] Success"
echo "--------------------------------------------------"
sleep $step
done
exit 0
Edit Delete
License by Moony