Scheduler / Cron jobs

The schedule functionnality allows to define recurring jobs using the crontab format.

The scheduler is accessible via the Administration > Your Instance > Actions > Scheduler

Here is an example below:
# m h  dom mon dow   command
0 5 * * * cd /home/user-id/ && node recur-job.js
This will execute every 5 AM the node app recur-job.js. It allows to define any kind of custom task.

Make sure to have the cron package installed and start crond (RUN echo 'crond' >> / in your Dockerfile. See this example.

Your Dockerfile should have these lines (with alpine-based images):

RUN echo 'crond' >> /
RUN echo 'crontab .openode.cron' >> /

Note that by default, .openode.cron is written automatically when you set the scheduler via the administration.