#!/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 ‘http://www.baidu.com/‘ echo "----------------------------------------------------------------------------" endDate=`date +"%Y-%m-%d %H:%M:%S"` echo "★[$endDate] Successful" echo "----------------------------------------------------------------------------" sleep $step done exit 0
直接修改脚本 变成每5秒执行一次
原文地址:https://www.cnblogs.com/em-x/p/9417122.html
时间: 2024-10-22 12:28:19