Takkun
Takkun

Reputation: 6361

How to setup Heroku Scheduler without Rails?

Reading the documentation here, https://devcenter.heroku.com/articles/scheduler, I see how to schedule tasks with rails. But I was wondering how to schedule tasks with regular ruby?

What do I have to put in the task field to have my ruby script run?

Upvotes: 5

Views: 897

Answers (2)

Tim Scott
Tim Scott

Reputation: 15205

Not sure if once upon a time you had to use rake, but no more. Just use ruby directly:

ruby path/to/yourfile.rb arg1 arg2

Upvotes: 0

nthj
nthj

Reputation: 445

You should be able to add a Rakefile to your regular ruby app, and run rake task_name via the scheduler.

Upvotes: 2

Related Questions