entrypoint.sh 263 B

123456789101112
  1. #!/bin/bash
  2. set -e
  3. if [[ $@ == crond* ]] && [ -z "$CRON_SCHEDULE" ]; then
  4. echo "ERROR: \$CRON_SCHEDULE not set!"
  5. exit 1
  6. fi
  7. # Write cron schedule
  8. echo "$CRON_SCHEDULE python -u /backup/backup.py > /dev/stdout" >> /var/spool/cron/crontabs/root
  9. exec "$@"