nerionavea
nerionavea

Reputation: 13

rufus-scheduler in a Heroku app

If I have a Sinatra app deployed in Heroku with a rufus-scheduler process running, if I make changes on this app and deploy it again, will I lose all the scheduler process?

Upvotes: 1

Views: 218

Answers (1)

jmettraux
jmettraux

Reputation: 3551

will I lose all the scheduler process?

Yes, of course, the current scheduler process will exit and a new one will get started.

Maybe you meant to ask:

will I lose all the scheduled jobs?

Yes, you'll lose all the scheduled jobs.

Rufus-scheduler provides no persistence mechanism, it's just a scheduling tool.

Most people have a fixed set of scheduled jobs that get scheduled as the process starts (and instantiates a rufus-scheduler then populates it with jobs). One of those jobs could trigger at a set frequency and check a DB or some kind of file for actual work to perform.

Fewer people have a model whose rows they read to populate rufus-scheduler with jobs. But with this technique, one has to carefully keep the scheduler and the rows in sync. More moving parts.

Upvotes: 0

Related Questions