Created
October 29, 2019 10:18
-
-
Save takuya-andou/63bf24dbffac85ee7a18a48f687633ed to your computer and use it in GitHub Desktop.
日付の文字列をキューに入れていくだけのスクリプト
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/sh | |
# | |
# YYYY-MM-DD | |
# | |
STARTDATE=20100101 | |
ENDDATE=20191005 | |
CURRENTDATE=$STARTDATE | |
while [ 1 ] ; do | |
echo $CURRENTDATE | |
/usr/bin/amqp-publish --url=$BROKER_URL -r job1 -p -b $CURRENTDATE | |
if [ $CURRENTDATE = $ENDDATE ] ; then | |
break | |
fi | |
CURRENTDATE=`date -d "$CURRENTDATE 1day" "+%Y%m%d"` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment