Heroku Scheduler support

Hello,

I just deployed my app to Heroku Free plan and looks like scheduling is not working for Heroku (at all) or for Heroku Free Plan.
If Heroku (or classic) app deployment is not supported for Scheduler - what would be requirements for hosting Docker?

Thank you.

Can you show a screenshot of your schedule

I’ve tried different ones: 10 minutes and once per day.
Looks like Heroku “schedule” works when app is in use and “spinned up”. At least on Free Tier:

Well that is the thing with Heroku free plan, if your server isn’t used it will go to sleep in half an hour. So no schedules will run.

Install something like Sentry, Relic or any other monitoring Heroku addon. It will keep the app alive 24/7

1 Like

Could also make another Scheduler that runs every 20 minutes that does something silly like a simple dummy database query, just to keep it alive.

1 Like

The problem with that approach although viable is that if your app crashes but not the heroku dyno it will go to sleep. Having an external service monitoring the app will wake it up also.

Ahh, i see, didn’t know that, thanks Jon

Not sure if that proper workaround, because currently there is a schedule each 10 minutes (which is twice frequent to your approach) - and application still goes to slip until someone really browse the web-site.

@psweb @JonL but what about deploying app as a Docker container? Is there any specific requirements for the hosting?

I already gave you a solution so your app doesn’t go to sleep.

Yes, I looked into this after Jon posted it and it looks like the correct solution to me too.

Thanks @psweb and @JonL for the solution.
But I’ve switched my app deployment to Docker and Hetzner hosting (not an add) - it even cheaper than Heroku.

2 Likes