Allow overriding cron schedule, fix vars

This commit is contained in:
3wc
2021-11-10 21:17:12 +02:00
parent c9de239e93
commit 721c393d2d
4 changed files with 21 additions and 5 deletions

11
setup-cron.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
set -o pipefail
cron_schedule="${CRON_SCHEDULE:?CRON_SCHEDULE not set}"
echo "$cron_schedule /usr/bin/backup.sh" | crontab -
crontab -l
crond -f -L /dev/stdout