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/cheap-nodejs-hosting.site/ && 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' >> /boot.sh) in your Dockerfile. See this example.

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

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

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