Andrey Subbotin
Andrey Subbotin

Reputation: 5373

How to prevent backgroundrb from starting multiple copies of the same task?

Say, I have a worker that's set up to run every 15 minutes using the cron scheduling feature of backgroundrb. Then, say, if a single instance of the worker takes longer than 15 minutes to run, I don't want a second worker to be started in paraller by backgroundrb. How do I achieve that?

Upvotes: 0

Views: 292

Answers (1)

Andrey Subbotin
Andrey Subbotin

Reputation: 5373

Okay, I guess I'll answer this one myself. The trick is to not specify reload_on_schedule true in your worker.

Upvotes: 3

Related Questions