user3587624
user3587624

Reputation: 1471

How to schedule a worker to run every x hours in Heroku?

I have created a Heroku free account and deployed a Node JS application through a web dyno.

Besides that, I would like to know whether a Heroku free account would allow me to schedule another dyno to execute another Node JS project which simply writes Hello World in the console every 2 hours. Is that possible? Where can I find documentation on how to do schedule a worker and run a Node JS application?

Upvotes: 3

Views: 1496

Answers (1)

Yoni Rabinovitch
Yoni Rabinovitch

Reputation: 5261

Heroku Scheduler is what you are looking for. This will spin up one-off dynos at whatever schedule you define, to run whatever task you define for it. Provided you do not exceed your account's free dyno-hours allocation between your web dyno and your one-off dynos, you will be able to do this completely for free.

Upvotes: 4

Related Questions