Skip to content

Instantly share code, notes, and snippets.

@takuya-andou
Created October 29, 2019 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takuya-andou/63bf24dbffac85ee7a18a48f687633ed to your computer and use it in GitHub Desktop.
Save takuya-andou/63bf24dbffac85ee7a18a48f687633ed to your computer and use it in GitHub Desktop.
日付の文字列をキューに入れていくだけのスクリプト
#!/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