<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ★ Is Delayed Job :run_at =&gt; DateTime Giving You Fits?</title>
	<atom:link href="http://www.gregbenedict.com/2009/08/19/is-delayed-job-run_at-datetime-giving-you-fits/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gregbenedict.com/2009/08/19/is-delayed-job-run_at-datetime-giving-you-fits/</link>
	<description>Thoughts on the web and creativity.</description>
	<lastBuildDate>Sat, 16 Jul 2011 08:15:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Christian</title>
		<link>http://www.gregbenedict.com/2009/08/19/is-delayed-job-run_at-datetime-giving-you-fits/comment-page-1/#comment-534</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Fri, 12 Nov 2010 08:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.gregbenedict.com/?p=114#comment-534</guid>
		<description>I went with this strategy and forgot to set DJ&#039;s maximum-attempts. It went out of controll with awful many jobs going bananas during the night due to an exception raised in each job:) I guess there are some trix to avoid this, delete other jobs before queue the next. Never run more then once. etc. I ended up with a solution where hourly cron schedules jobs for the next 12 hours, and maintain the job-queue and sees to that all jobs are present. So cron checks that there always are 720 jobs present, one for each minute.. Not a good solution eighter I think, a long queue for a simple task. Another strategy I found usefull is to setup a remote crontab doing curl against a middelware-url in my app on Heroku every minute.</description>
		<content:encoded><![CDATA[<p>I went with this strategy and forgot to set DJ&#8217;s maximum-attempts. It went out of controll with awful many jobs going bananas during the night due to an exception raised in each job:) I guess there are some trix to avoid this, delete other jobs before queue the next. Never run more then once. etc. I ended up with a solution where hourly cron schedules jobs for the next 12 hours, and maintain the job-queue and sees to that all jobs are present. So cron checks that there always are 720 jobs present, one for each minute.. Not a good solution eighter I think, a long queue for a simple task. Another strategy I found usefull is to setup a remote crontab doing curl against a middelware-url in my app on Heroku every minute.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Benedict</title>
		<link>http://www.gregbenedict.com/2009/08/19/is-delayed-job-run_at-datetime-giving-you-fits/comment-page-1/#comment-530</link>
		<dc:creator>Greg Benedict</dc:creator>
		<pubDate>Tue, 12 Oct 2010 15:38:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gregbenedict.com/?p=114#comment-530</guid>
		<description>Graeme,

There are two steps that I do. The first is I create a rake task that adds the job to the queue.
    
        Delayed::Job.enqueue MyStruct.new()

The second step is that I add a similar call at the bottom of the MyStruct perform() method.

        Delayed::Job.enqueue MyStruct.new(), 0, 1.minute.from_now.getutc

Now this isn&#039;t programmatically ideal because it creates a new record every minute. But in practice, you won&#039;t max out an 11 digit integer field in the next 100 years.</description>
		<content:encoded><![CDATA[<p>Graeme,</p>
<p>There are two steps that I do. The first is I create a rake task that adds the job to the queue.</p>
<p>        Delayed::Job.enqueue MyStruct.new()</p>
<p>The second step is that I add a similar call at the bottom of the MyStruct perform() method.</p>
<p>        Delayed::Job.enqueue MyStruct.new(), 0, 1.minute.from_now.getutc</p>
<p>Now this isn&#8217;t programmatically ideal because it creates a new record every minute. But in practice, you won&#8217;t max out an 11 digit integer field in the next 100 years.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graeme Simpson</title>
		<link>http://www.gregbenedict.com/2009/08/19/is-delayed-job-run_at-datetime-giving-you-fits/comment-page-1/#comment-529</link>
		<dc:creator>Graeme Simpson</dc:creator>
		<pubDate>Tue, 12 Oct 2010 14:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.gregbenedict.com/?p=114#comment-529</guid>
		<description>Hi Greg,

I&#039;m also trying to get heroku to run a task every minute. Could you tell me how you populated the delayed jobs table so that there was a task for every minute?

Many thanks,
Graeme</description>
		<content:encoded><![CDATA[<p>Hi Greg,</p>
<p>I&#8217;m also trying to get heroku to run a task every minute. Could you tell me how you populated the delayed jobs table so that there was a task for every minute?</p>
<p>Many thanks,<br />
Graeme</p>
]]></content:encoded>
	</item>
</channel>
</rss>

