I don't really have a need for scheduled or repeating jobs, but I get a lot of pull requests for hacks to make delayed_job support them. My personal opinion is that If something repeats on a consistent schedule, delayed_job is a poor tool for running them. Something like cron is much better suited. And if you do need repeating jobs, then it is as simple as defining a job that re-enqueues itself after it is done running.
I'm debating whether I should pull in a patch that supports repeating jobs, or just post some docs on the wiki that show how to do it. Does anyone have any strong feelings about this?
I was just looking through the forkqueue and terrbear has the best implementation that I've seen yet (least intrusive at least).
http://github.com/terrbear/delayed_job/commit/6df06985dc71a5f03526365f9bfb2270edf9e66f
Brandon
To unsubscribe from this group, send email to delayed_job+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
--
Daniel Morrison
[i] Collective Idea
349 Pine Avenue
Holland, MI 49423
Because of that I would be in favor of a recurring job feature.
Cheers,
Menno
1) No extra code needed to guard against two instances of the same
job running at the same time
2) Manage status of jobs in one place
3) DJ's awesome retry logic
thx
As someone who had worked on a similar patch (
http://github.com/fredwu/delayed_job/commit/8bb23a3d3abb6d4090d7e87639f181c03c2869ab
), my vote would be +1. :)
For me personally, I'm not even after repeating jobs, but to run jobs
at a set interval.
Yes we could use cron, or some customised app code to do it. However,
for really simple jobs such as running them in a set interval, having
this ability built-in is really beneficial as there is no extra code
needed. This decreases the code complexity and makes delayed_job more
useful, it's a win win imo. :)
Cheers,
Fred
> http://github.com/terrbear/delayed_job/commit/6df06985dc71a5f03526365...
>
> Brandon
Our situation may be different than others, but we have about 40
different recurring jobs in our system. We use cron and suffer the
startup cost penalty, but we've considered rufus-scheduler or
something similar to work as a long running process, reducing the high
startup cost of Rails.
Best,
Michael Guterl
> --
> To unsubscribe, reply using "remove me" as the subject.
>
We personally would love to see delayed_job take up the cron ability.
It's not so much that cron is a bad solution, it'd be awesome to get
it all packaged in one. One system handling all things that aren't
going to happen immediately whether scheduled or requested.
We just created a fork that pulls in both your's and patches it with
Terry's.
Justin
On Apr 7, 6:51 am, Michael Guterl <mgut...@gmail.com> wrote:
> I'm curious what the effect of having "extra" jobs just sitting in the
> queue will have on performance. Maybe with the new inverted indexes
> this won't be a problem.
>
> Our situation may be different than others, but we have about 40
> different recurring jobs in our system. We use cron and suffer the
> startup cost penalty, but we've considered rufus-scheduler or
> something similar to work as a long running process, reducing the high
> startup cost of Rails.
>
> Best,
> Michael Guterl
>
> On Wed, Apr 7, 2010 at 1:30 AM, Fred Wu <ifre...@gmail.com> wrote:
> > Hey guys,
>
> > As someone who had worked on a similar patch (
> >http://github.com/fredwu/delayed_job/commit/8bb23a3d3abb6d4090d7e8763...