Last active
October 19, 2019 00:07
-
-
Save ring0li/aab5441768f8ec91e74ee7690a394809 to your computer and use it in GitHub Desktop.
[shell] shell #shell
This file contains hidden or 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
```shell | |
#!/bin/bash | |
startDate="${1:-2018-08-20 00:00:00}" | |
endDate="${2:-$(date '+%Y-%m-%d %H:00:00')}" | |
cd /home/work/wwwroot/; | |
for (( i = 0; ; i++ )) | |
do | |
date="$(date -d "$startDate $i hour" '+%Y-%m-%d %H:00:00')" | |
if [ "$date" != "$endDate" ]; then | |
echo /home/work/lib/php7.1.4/bin/php crontab.php stat/stat_report cron_stat_report_flow "'$date'"; | |
# /home/work/lib/php7.1.4/bin/php crontab.php stat/stat_report cron_stat_report_flow "$date"; | |
else | |
echo 'Game Over' | |
exit 0 | |
fi | |
sleep 1 | |
done | |
``` |
Author
ring0li
commented
Sep 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment