You could set the scheduler to run a rake task hourly and then check the time in your task to see if it's wednesday.
if Time.now.wday == 3 && Time.now.hour == 11 # double check the time zone # do your thing end On Mar 5, 3:03 pm, Dave <[email protected]> wrote: > Hi, > > I have always had my delayed jobs run by having them spin up their own > worker, and then clean-up and spin-down their worker when they > complete. > > Now I want to have Jobs run at set times in the future. Recurrent > jobs... for example, the client wants four pricing checks to occur, > for the next four weeks, at 11:00pm on Wednesdays. > > I have my 4 jobs all setup in my DelayedJob Queue, ready to run at > those times... but I am not into running a worker for the whole > duration of that period of time, since each job may only take 10 > seconds, or 2 minutes... seems crazy to run a dedicated worker to do > this... and it seems just as crazy to have 4 workers spawned to live > and die with the 4 events. > > So what is a good way to take advantage of the Heroku Scheduler? I > know I can now run a task every 10 minutes for example... I am just > not sure if it is meant to help in this case. I can imagine using it > to spin up a worker to run any jobs that might be runnable, but then I > run into the same issue of spinning down the worker that was started. > > What would be a good way to not burn workers but still have the > benefit of scheduling jobs with Delayed Job at random times in the > future? -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
