Question - How to Enable cron in Docker Container?

After upgrading community edition, Docker install, the system health report shows that cron is not enabled. How do I enable cron for the docker install?

1 Like

Crons are enabled by default. If crons are NOT OK in system health, the first thing to do is to look at settings/cron history, maybe they are finished with some error.
If you do not see records of crons, it means they are not running, you have to check logs there might be some more information about the problem.

Nick… were you able to resolve? I’m still trying to figure this out… I did the Docker community install from scratch and have not changed anything, but the health report shows:
Worker Under System / Settings / Crontab Settings you can review the required crontab configurations. - NOT OK

Hello,

Please go inside the cron container with the command:
docker exec -it cron bash
and then run these two commands:

touch /var/log/cron.log
chown www-data: /var/log/cron.log

The worker will start running the next minute.

2 Likes

Thanks Sam! You are appreciated!

2 Likes

this path is not declared as persistant storage in the deployment script (compose file), which, if for whatever reason, will result in that file will be removed upon container restart - should that path be mounted as a volume?

Hello,

The problem was only with version 3.18.0, it was fixed with the hotfix 3.18.1.

Hi Sam, we’re having an issue with the Cron job in docker after our migration. It was working before for 3.17 but once we brought the DB over it doesn’t seen to want to kick off the cron jobs anymore within the container. I looked at the cron.log and see these:


[2023-02-08 15:40:53] Looking for Job …
nothing to do, sleeping.
Entity save failure. Found the following errors (server.validateCount: “Too many workers running. Check your Queue.maxworkers config.”).
Cannot start worker: Too many workers already/still running on this server (2/2)

[2023-02-08 15:41:03] Looking for Job …
nothing to do, sleeping.

[2023-02-08 15:41:03] Looking for Job …
nothing to do, sleeping.

[2023-02-08 15:41:13] Looking for Job …
nothing to do, sleeping.

[2023-02-08 15:41:13] Looking for Job …
nothing to do, sleeping.

[2023-02-08 15:41:23] Looking for Job …
nothing to do, sleeping.

Any info would be appreciated. Thanks!

Hello,

In these logs I can not see anything special, it just says there is nothing in the queue that the worker can process. Please write us to support@eramba.org and we can do a quick call to review.

This is resolved for me after doing touch /var/log/cron.log and adding a ‘Public Address’. I was able to update to 3.18.1 after following sam’s instructions above.

1 Like

This resolved my issue and allowed me to update to 3.18.1

1 Like