Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Provide Moodle Cron? #161

Closed
andisugandi opened this issue Feb 12, 2023 · 1 comment
Closed

How to Provide Moodle Cron? #161

andisugandi opened this issue Feb 12, 2023 · 1 comment

Comments

@andisugandi
Copy link

I could not find the Moodle Cron when using the container image: moodlehq/moodle-php-apache.

$ crontab -l
bash: crontab: command not found

Should we make it by customizing the Dockerfile?

Any suggestions?

Thank you in advance.

@stronk7
Copy link
Member

stronk7 commented May 5, 2023

Hi @andisugandi ,

while it's possible to add cron support to the images / containers, it's not considered good practice. Problems can arrive, specially in prod environments with forked processes dying and not being monitored by the engine...

So, the recommendation is to create another image, specialised into running cron (or any other scheduling alternative).

Basically, "Each container, one task" (process).

Surely you will find out there various ways to achieve that, from the host own crontab being in charge to "exec" the cron in the container, to other containers launching cron via web request against the apache/moodle container... or a complete stack with access to the codebase, database and moodledata and running the cron locally.

I'm going to close this now, ciao :-)

@stronk7 stronk7 closed this as completed May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants