Provider icon

How to run periodic jobs on Heroku?

Heroku is a cloud platform as a service (PaaS) supporting several programming languages. One of the first cloud platforms, Heroku has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go. For this reason, Heroku is said to be a polyglot platform as it has features for a developer to build, run and scale applications in a similar manner across most languages.

When using that application, you may face the need to run periodic jobs within this platform. To achieve that, there are multiple solutions.

Schedule in Heroku

Heroku, by default doesn't offer any recurring job scheduling solution. However, it works with a system of application that allows you to extend your main app with additional features.

Among those applications, there is one called scheduler, which allows you to configure recurring jobs. To learn more about scheduler, check this article: https://devcenter.heroku.com/articles/scheduler

Schedule with Cronit

If you don't want to add an extra application to your Heroku instances, or, if you want to save costs or add extra granularity, you can also use a third-party solution such as Cronit.

Cronit is an online Cronjob system, that is a tool you can use to configure recurring tasks by calling predefined endpoints on your application.
screenshot