Add cronjob Mode For The Docker Container

fixes #907
This commit is contained in:
Zicklag
2019-04-09 15:57:38 +00:00
parent a41ba79119
commit 3895c86812
3 changed files with 29 additions and 0 deletions

View File

@@ -44,6 +44,14 @@ case "$1" in
exec /usr/bin/weed $@ $ARGS
;;
'cronjob')
MASTER=${WEED_MASTER-localhost:9333}
CRON_SCHEDULE=${CRON_SCHEDULE-*/5 * * * * *}
echo "$CRON_SCHEDULE" 'echo "volume.fix.replication" | weed shell -master='$MASTER > /crontab
echo "Running Crontab:"
cat /crontab
exec supercronic /crontab
;;
*)
exec /usr/bin/weed $@
;;