Last active
May 7, 2020 06:06
-
-
Save yusureabc/95a8046a9925d285622839ba254bb1e3 to your computer and use it in GitHub Desktop.
crontab 秒级实现
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
step=2 #间隔的秒数,不能大于60 | |
for (( i = 0; i < 60; i=(i+step) )); do | |
/usr/bin/curl 'http:/xxx.com/api/hello' | |
sleep $step | |
done | |
exit 0 | |
# http://blog.csdn.net/fdipzone/article/details/22701113 # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment