docker-crontab
docker-crontab copied to clipboard
Configuration cleanup/jobs clean up
trafficstars
Is there a method for controlling how the config.working.json is updated, cleaned up after editing the config.json/yml?
And same with the jobs folder, this seems to hold a lot of script files that do not seem to get cleaned up. Unsure if there's a method for doing this.
@psyciknz this was buggering me too
i've found a quick workaround, just point the HOME_DIR variable to a tmpfs mount and on every container restart the folder will clear out and regenerate the latest crontabs
in docker-compose just modify like this:
....
environment:
HOME_DIR: "/crontab" # <-- this can be (almost) anything but it needs to also match the config.json/yml path below
volumes:
- type: tmpfs
target: /crontab
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/opt/crontab/config.yml:/crontab/config.yml:rw" # <-- important for this to be AFTER the tmpfs mount
....