Skip to content

Instantly share code, notes, and snippets.

@yusureabc
Last active May 7, 2020 06:06
Show Gist options
  • Save yusureabc/95a8046a9925d285622839ba254bb1e3 to your computer and use it in GitHub Desktop.
Save yusureabc/95a8046a9925d285622839ba254bb1e3 to your computer and use it in GitHub Desktop.
crontab 秒级实现
#!/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