dsp_099
dsp_099

Reputation: 6121

How to run rake tasks in the background daily without using cron or heroku scheduler?

I want the rake task to do some quick API calls daily at 9AM Eastern.

I thought about wiring an initializer that busywaits until it's 9:01 or something like that but that seems silly.

I know heroku has their own internal scheduler but is it necessary to use for a simple API call?

Upvotes: 0

Views: 460

Answers (1)

dsw88
dsw88

Reputation: 4592

You're going to have to use some sort of scheduler to run your rake task, be it cron or the heroku scheduler.

Rake is just a specialized build DSL, it's just a language that can run builds or other tasks. It's a program just like any other, and hence can only run when someone tells it to. That someone would be a scheduler like cron.

Upvotes: 1

Related Questions