Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
日付の文字列をキューに入れていくだけのスクリプト
#!/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
You can’t perform that action at this time.