aptible / supercronic

Cron for containers
MIT License
1.84k stars 112 forks source link

Load crontab files from directory #130

Open txigreman opened 1 year ago

txigreman commented 1 year ago

Does supercronic support to load all crontabs files in a specific directory? Something like crond service does with /etc/cron.d/.

As a workaround I could add an entrypoint an merge all of them in a single file, but I would love to simply run supercronic /path/to/cron/files/, or similar.

UserNotFound commented 1 year ago

Supercronic can only read from a single file. You could accomplish in an ENTRYPOINT or CMD with only a small effort: cat /path/to/cron/files/* > /tmp/all.crons && exec supercronic /tmp/all.crons

thekashifmalik commented 10 months ago

I have this use case now. I will try the work-around given but I think I may run into permissions issues. Seems like it would be a pretty useful feature regardless; loading crontabs from a directory or loading multiple crontabs in general.