SeriousM
SeriousM

Reputation: 3541

Scheduling Jobs

I would like to know how I can schedule jobs that are recurring over and over again like loading data from an api service or sending emails. I found resque and resque-scheduler but it uses Redis as backend what is an overkill dependency for fix-timed jobs.

Is there a way to schedule ruby code blocks in rails environment for a fixed time without the external dependencies?

Upvotes: 0

Views: 369

Answers (3)

Mansoor Elahi
Mansoor Elahi

Reputation: 959

You can also checkout Rufus scheduler https://github.com/jmettraux/rufus-scheduler which also uses crontab to schedule, and it has some extra features which you may like it as well!

Upvotes: 1

edelpero
edelpero

Reputation: 157

As phoet recommend you, whenever is the gem you need. I will also recommend you sidekiq instead of resque. Sidekiq is newer and has better performance. Theres a Railscast about sidekiq, you should check it out.

Upvotes: 0

phoet
phoet

Reputation: 18845

i guess you are looking for something like whenever: https://github.com/javan/whenever

it uses crontab to schedule your work.

Upvotes: 3

Related Questions