spherulitic / xerafin3

Xerafin Word Study System
1 stars 0 forks source link

Create container to run cron jobs #75

Closed spherulitic closed 1 year ago

spherulitic commented 1 year ago

Cron jobs required include:

A subtask will be changing the awards volume to an external one so the cron container can write to it.

spherulitic commented 1 year ago

See also this:

https://stackoverflow.com/questions/37458287/how-to-run-a-cron-job-inside-a-docker-container/46220104#46220104

spherulitic commented 1 year ago

Also this sample Dockerfile from ChatGPT:

`FROM ubuntu:20.04

Install cron

RUN apt-get update && apt-get install -y cron

Add crontab file

ADD crontab /etc/cron.d/maintenance-script

Give execution rights to the cron job

RUN chmod 0644 /etc/cron.d/maintenance-script

Apply cron job

RUN crontab /etc/cron.d/maintenance-script

Create the log file to be able to run tail

RUN touch /var/log/cron.log

Run the command on container startup

CMD crond && tail -f /var/log/cron.log `

spherulitic commented 1 year ago

Note -- once daily quizzes are being generated, fixing subscriptions is the next step.