Skip to content

issues with cron schedule #59

@stefangweichinger

Description

@stefangweichinger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions