Cron Job With Open edX

Does anyone have idea on how to run cron job in Open edX

I tried in django project and its working but not working in Open edX i think because of docker container

Putting Open edX aside, I think to run a corn inside a container you have mainly two option:

  1. To define/run the corn from inside the container env.
  2. To define the corn job inside the host env.

I think to effectively do 1, you might have essentially, to add few lines to the Dockerfile, but I am not sure how exactly the implication of that, since for example if you are using tutor (the official way to run open edx), tutor uses the same image, for lms, cms, lms-worker, and cms-worker.

On the other hand with 2, by just defining the job inside your host, and then ask tutor/docker to run the command, e.g. tutor run service options/args. or docker exec container options/args

1 Like