fix outdated cron job scripts

fix https://github.com/chrislusf/seaweedfs/issues/1881
This commit is contained in:
Chris Lu 2021-03-09 16:49:05 -08:00
parent 5be83dd4a9
commit bf5b795717

View file

@ -60,9 +60,9 @@ case "$1" in
'cronjob') 'cronjob')
MASTER=${WEED_MASTER-localhost:9333} MASTER=${WEED_MASTER-localhost:9333}
FIX_REPLICATION_CRON_SCHEDULE=${CRON_SCHEDULE-*/7 * * * * *} FIX_REPLICATION_CRON_SCHEDULE=${CRON_SCHEDULE-*/7 * * * * *}
echo "$FIX_REPLICATION_CRON_SCHEDULE" 'echo "volume.fix.replication" | weed shell -master='$MASTER > /crontab echo "$FIX_REPLICATION_CRON_SCHEDULE" 'echo "lock; volume.fix.replication; unlock" | weed shell -master='$MASTER > /crontab
BALANCING_CRON_SCHEDULE=${CRON_SCHEDULE-25 * * * * *} BALANCING_CRON_SCHEDULE=${CRON_SCHEDULE-25 * * * * *}
echo "$BALANCING_CRON_SCHEDULE" 'echo "volume.balance -c ALL -force" | weed shell -master='$MASTER >> /crontab echo "$BALANCING_CRON_SCHEDULE" 'echo "lock; volume.balance -collection ALL_COLLECTIONS -force; unlock" | weed shell -master='$MASTER >> /crontab
echo "Running Crontab:" echo "Running Crontab:"
cat /crontab cat /crontab
exec supercronic /crontab exec supercronic /crontab