docker-mssql-backup icon indicating copy to clipboard operation
docker-mssql-backup copied to clipboard

issues with cron schedule

Open stefangweichinger opened this issue 10 months ago • 2 comments

I am trying to establish a schedule running every 2 hours during the workweek:

  backup:
    image: bbtsoftwareag/mssql-backup:0.6.1
    depends_on:
      - sql.data
    environment:
      - TZ=UTC+1
      - DB_SERVER=sqlsrv
      - DB_USER=SA
      - DB_PASSWORD=sompwd
      - "DB_NAMES=
      intranet"
      - CRON_SCHEDULE=05 7-17/2 * * 1-5
    networks:
      - front

The container runs and the crontab seems OK in there, although there are no backups triggered.

If I use CRON_SCHEDULE=05 7-17 * * 1-5, it works (but runs every hour, sure)

So maybe the slash isn't interpreted correctly or something like that.

- CRON_SCHEDULE=05 7-17/2 * * 1-5

or

- CRON_SCHEDULE="05 7-17/2 * * 1-5" (quotes)

results in

root@0ceeaa17d526:/# crontab -l
05 7-17/2 * * 1-5 . /container_env.sh; /usr/local/bin/backup.sh > /proc/1/fd/1 2>&1 | tee -a

looks OK; but didn't work yesterday. I keep trying things, just reporting/asking here.

stefangweichinger avatar Dec 18 '24 08:12 stefangweichinger