Skip to content

Advanced Scheduling

Robin Ingelbrecht edited this page Jan 30, 2025 · 3 revisions

If you want more control over cron then IMPORT_AND_BUILD_SCHEDULE provides then you can take over the crontab file by mounting it into a volume.

services:
 #...
   volumes:
     #...
     -  /host/path/to/cron/folder:/config/crontabs

After mounting and starting the container once, the abc crontab will be created in the host dir.

To disable the container from modifying this file automatically remove

printf "AUTO CRON"

from the example cron schedule.

To check if your schedule was applied in the container crontab, you can run

docker compose exec app crontab -u abc -l

After making changes to abc you will need to restart the container for the changes to take effect. You may want to also set correct file permissions for the crontab file.

Clone this wiki locally