In my case, I wanted to host an instance of Mautic. Mautic relies on a dozen or so cron tasks to be run in the background to do essential jobs - importing contacts, sending emails, checking bounces, etc. It turned out there is no Dokku plugin or a standard way of running these cron tasks.

That sounds wasteful - scaling, entering running docker instance takes a few seconds for Dokku. I also have to manually copy crontab config on the Dokku host instead of keeping it as part of the deployed app repository.

I found a relatively easy solution to manage it. It involves an additional to 'web' process inside Procfile. I called it cron. Since Mautic needs to have its cron tasks to run quite often, it made sense to keep cron process running all the time. And that process would run all necessary cron tasks.

I started with defining crontab file for all tasks Mautic needs. I did some digging and debugging to find correct $PATH to allow bash to find bundled PHP executable: