Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cron not firing #155

Closed
1player opened this issue Feb 2, 2023 · 4 comments
Closed

cron not firing #155

1player opened this issue Feb 2, 2023 · 4 comments
Labels

Comments

@1player
Copy link

1player commented Feb 2, 2023

Logs say

2023-01-31T11:53:32.217657538Z Scheduling backup job according to cron expression.
2023-01-31T11:53:32.226874616Z new cron: "0 0 3 * * *"

and nothing else. I've made sure it works by setting RUN_ON_STARTUP=true, but for some reason cron isn't firing. I see the go-cron process running inside the container, with args go-cron "0 0 3 * * *" /usr/local/bin/backup

My config:

version: '3'

services:
  restic:
    image: mazzolino/restic:latest
    hostname: cupboard
    privileged: true
    volumes:
      - ./exclude.txt:/exclude.txt
      - /volume1:/data/volume1:ro
      - ./ssh:/run/secrets/.ssh:ro
    environment:
      - RUN_ON_STARTUP=false
      - RESTIC_REPOSITORY=sftp:xxx:restic-home/
      - RESTIC_PASSWORD=xxx
      - BACKUP_CRON="0 0 3 * * *"
      - RESTIC_BACKUP_ARGS=--exclude-file /exclude.txt
      - RESTIC_FORGET_ARGS=--prune --keep-daily 7 --keep-weekly 4 --keep-monthly 3 --keep-yearly 1 --keep-tag keep --host cupboard
      - RESTIC_CHECK_ARGS=--read-data-subset 10%
@djmaze
Copy link
Owner

djmaze commented Feb 13, 2023

Mhh.. Really hard to say something about this. Did you pull the latest image? It works for me.

@djmaze djmaze added the bug label Feb 13, 2023
@1player
Copy link
Author

1player commented Feb 14, 2023

I did. In fact I downloaded the image for the first time the day I opened this bug report.

@djmaze
Copy link
Owner

djmaze commented Feb 14, 2023

Ah.. I guess you trapped on environment variable quoting.

Try to leave out the quotes in the BACKUP_CRON line.

@1player
Copy link
Author

1player commented Feb 15, 2023

Good catch! Thanks for the help.

@1player 1player closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants