Rufus Sheduler, Dinamic timing changing

Hi!

In my app, i’m using Rufus Sheduler to shedule some automatic tasks, my
problem is that i want to set the frecuency of this task from an
external VAR.
Actually i have something like this: (simplify)

repeat = Rufus::Scheduler::PlainScheduler.start_new # create a shedule
process

blabla…

repeat.every “VAR” :blocking => true do
blabla…
end

repeat.join
It’s works fine, but when i update “VAR” (i.e. 2s to 8s) , the frecuency
does not update the value, it continues doing the task every 2s…

What it’s the way to update this value at the sheduling?

Thaks a lot!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs