Eric Nemchik 4f38927ba6
Merge pull request #805 from linuxserver/universal-cron-periodic
Add root periodic crontabs for logrotate
2023-12-28 12:22:17 -06:00
2020-02-02 15:55:44 -05:00
2020-02-02 15:55:44 -05:00
2020-02-02 15:55:44 -05:00
2023-05-18 15:32:00 -04:00
2019-05-30 20:35:20 +01:00
2023-08-26 13:06:44 -05:00

cron - Docker mod for any container

This mod adds cron to any container, to be installed/updated during container start.

In any container docker arguments, set an environment variable DOCKER_MODS=linuxserver/mods:universal-cron

If adding multiple mods, enter them in an array separated by |, such as DOCKER_MODS=linuxserver/mods:universal-cron|linuxserver/mods:universal-mod2

This mod will ensure you have /config/crontabs/root and /config/crontabs/abc files where you can add cron jobs to run inside the container as root or as the abc user (associated with the PUID/PGID environment variables).

No cron jobs (aside from what may be included in the base OS) are included by default.

You can test to confirm things are working by adding the following line to /config/crontabs/root or /config/crontabs/abc

*/5 * * * *    /bin/echo test >> /config/tmp.txt

Then restart the container and wait 5 minutes to see that the test completes. Remove the test and restart the container after confirming.

Description
No description provided
Readme GPL-3.0 6.5 MiB
Languages
Text 100%