aboutsummaryrefslogtreecommitdiff
path: root/docker/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/entrypoint.sh')
-rwxr-xr-xdocker/entrypoint.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 660e51766..4e0d659ae 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -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 $@
;;