Scheduling Automated Jobs

To create a scheduled job that is executed by a Dokku application, first check if the following Dokku command returns a valid response:

dokku cron

If yes, then follow the "Dokku Managed Cron" guidance in the official documentation site. Otherwise, the "Self Managed Cron" section will be applicable to your case; just place the crontab in the virtual machine's filesystem at /etc/cron.d/APP.

If possible, test your command syntax before scheduling it as an automated job. You can manually execute a one-off job using the following format:

dokku --rm run my-app some-command

If you are using the dokku cron method, each scheduled job is run as a one-off container, and its log output will be present in the /var/log/dokku/apps directory. If you are using the "self-managed cron" method, when defining the command in the crontab, you can specify a target log file to direct output, e.g.

>> /var/log/cron.log 2>&1