<?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: Craken</title>
	<atom:link href="http://dougmcinnes.com/2008/07/14/craken/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougmcinnes.com/2008/07/14/craken/</link>
	<description>Chuckle and Chortle</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:06:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Robb Lovell</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-58</link>
		<dc:creator>Robb Lovell</dc:creator>
		<pubDate>Mon, 19 Apr 2010 02:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-58</guid>
		<description>If you do want to put a non-rake command in the cron file, you could make a convention where you add the word &quot;direct&quot; in the raketab in front of cron jobs you want to call that are not rake commands:

direct 59 * * * * some_command &gt; /tmp/log.log 2&gt;&amp;1

Just change append_tasks in cracken.rb like this:

  def append_tasks(crontab, raketab)
    crontab &lt;&lt; &quot;### #{APP_NAME} raketab\n&quot;
    raketab.each_line do &#124;line&#124;
      line.strip!
      unless line =~ /^#/ &#124;&#124; line.empty? # ignore comments and blank lines
        sp = line.split
        direct = false
        if sp.first == &quot;direct&quot;
          sp.shift
          crontab &lt;&lt; sp[0,5].join(&#039; &#039;)
          tasks = sp[5,sp.size]
          direct = true
        elsif SPECIAL_STRINGS.include?(sp.first)
          crontab &lt;&lt; sp.shift
          tasks = sp
        else
          crontab &lt;&lt; sp[0,5].join(&#039; &#039;)
          tasks = sp[5,sp.size]
        end
        if direct
          crontab &lt;&lt; &quot; cd #{DEPLOY_PATH} &amp;&amp; &quot;
          tasks.each do &#124;task&#124;
            crontab &lt;&lt; &quot; #{task}&quot;
          end
        else
           crontab &lt;&lt; &quot; cd #{DEPLOY_PATH} &amp;&amp; #{RAKE_EXE} --silent RAILS_ENV=#{RAKETAB_RAILS_ENV}&quot;
           tasks.each do &#124;task&#124;
             crontab &lt;&lt; &quot; #{task}&quot;
           end
        end
        crontab &lt;&lt; &quot;\n&quot;
      end
    end
    crontab &lt;&lt; &quot;### #{APP_NAME} raketab end\n&quot;
    crontab
  end

I realize that it somewhat goes against why craken was written, but sometimes you do want to manage a non-rake command from rails.</description>
		<content:encoded><![CDATA[<p>If you do want to put a non-rake command in the cron file, you could make a convention where you add the word &#8220;direct&#8221; in the raketab in front of cron jobs you want to call that are not rake commands:</p>
<p>direct 59 * * * * some_command &gt; /tmp/log.log 2&gt;&amp;1</p>
<p>Just change append_tasks in cracken.rb like this:</p>
<p>  def append_tasks(crontab, raketab)<br />
    crontab &lt;&lt; &quot;### #{APP_NAME} raketab\n&quot;<br />
    raketab.each_line do |line|<br />
      line.strip!<br />
      unless line =~ /^#/ || line.empty? # ignore comments and blank lines<br />
        sp = line.split<br />
        direct = false<br />
        if sp.first == &quot;direct&quot;<br />
          sp.shift<br />
          crontab &lt;&lt; sp[0,5].join(&#039; &#039;)<br />
          tasks = sp[5,sp.size]<br />
          direct = true<br />
        elsif SPECIAL_STRINGS.include?(sp.first)<br />
          crontab &lt;&lt; sp.shift<br />
          tasks = sp<br />
        else<br />
          crontab &lt;&lt; sp[0,5].join(&#039; &#039;)<br />
          tasks = sp[5,sp.size]<br />
        end<br />
        if direct<br />
          crontab &lt;&lt; &quot; cd #{DEPLOY_PATH} &amp;&amp; &quot;<br />
          tasks.each do |task|<br />
            crontab &lt;&lt; &quot; #{task}&quot;<br />
          end<br />
        else<br />
           crontab &lt;&lt; &quot; cd #{DEPLOY_PATH} &amp;&amp; #{RAKE_EXE} &#8211;silent RAILS_ENV=#{RAKETAB_RAILS_ENV}&quot;<br />
           tasks.each do |task|<br />
             crontab &lt;&lt; &quot; #{task}&quot;<br />
           end<br />
        end<br />
        crontab &lt;&lt; &quot;\n&quot;<br />
      end<br />
    end<br />
    crontab &lt;&lt; &quot;### #{APP_NAME} raketab end\n&quot;<br />
    crontab<br />
  end</p>
<p>I realize that it somewhat goes against why craken was written, but sometimes you do want to manage a non-rake command from rails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks for June 19th through June 28th at Logicola</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-45</link>
		<dc:creator>Bookmarks for June 19th through June 28th at Logicola</dc:creator>
		<pubDate>Sun, 28 Jun 2009 22:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-45</guid>
		<description>&lt;p&gt;[...] Craken &#124; Doug McInnes - [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Craken | Doug McInnes &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Infovore &#187; links for August 9th</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-34</link>
		<dc:creator>Infovore &#187; links for August 9th</dc:creator>
		<pubDate>Sun, 10 Aug 2008 00:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-34</guid>
		<description>&lt;p&gt;[...] Doug McInnes :: Craken &quot;This [plugin] is called Craken. In a nutshell it manages and installs rake-centric cron jobs. Coupled with Capistrano goodness it is the answer to your recurring task needs in Rails.&quot; (tags: none) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Doug McInnes :: Craken &quot;This [plugin] is called Craken. In a nutshell it manages and installs rake-centric cron jobs. Coupled with Capistrano goodness it is the answer to your recurring task needs in Rails.&quot; (tags: none) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor Turk</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-33</link>
		<dc:creator>Trevor Turk</dc:creator>
		<pubDate>Thu, 07 Aug 2008 19:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-33</guid>
		<description>&lt;p&gt;Sweet. I&#039;ve been looking for something like this. Much appreciated.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sweet. I&#8217;ve been looking for something like this. Much appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Fresh Cup &#187; Blog Archive &#187; Double Shot #264</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-32</link>
		<dc:creator>A Fresh Cup &#187; Blog Archive &#187; Double Shot #264</dc:creator>
		<pubDate>Thu, 07 Aug 2008 10:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-32</guid>
		<description>&lt;p&gt;[...] Craken - Rails plugin to manage rake-centric cron jobs. (via Giles Bowkett) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Craken &#8211; Rails plugin to manage rake-centric cron jobs. (via Giles Bowkett) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rails Cron &#8212; Craken &#171; Gem Install That</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-30</link>
		<dc:creator>Rails Cron &#8212; Craken &#171; Gem Install That</dc:creator>
		<pubDate>Sat, 19 Jul 2008 03:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-30</guid>
		<description>&lt;p&gt;[...] &#8212;&#160;Craken July 18, 2008 Posted by John Dewey in Uncategorized.  trackback  My good buddy Doug Mciness wrote a rake task to manage and install cronjobs. We have it hooked into our Capistrano [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] &#8212;&nbsp;Craken July 18, 2008 Posted by John Dewey in Uncategorized.  trackback  My good buddy Doug Mciness wrote a rake task to manage and install cronjobs. We have it hooked into our Capistrano [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-29</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Tue, 15 Jul 2008 03:20:25 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-29</guid>
		<description>&lt;p&gt;Awesome!  Let me know how it works for you.
YML might be an idea, I just can&#039;t think of a better way to define recurring date/times (not to mention it makes translation to crontab format crazy easy).  I guess I&#039;m used to it too.  Any ideas?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Awesome!  Let me know how it works for you.<br />
YML might be an idea, I just can&#8217;t think of a better way to define recurring date/times (not to mention it makes translation to crontab format crazy easy).  I guess I&#8217;m used to it too.  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Micah Calabrese</title>
		<link>http://dougmcinnes.com/2008/07/14/craken/comment-page-1/#comment-28</link>
		<dc:creator>Micah Calabrese</dc:creator>
		<pubDate>Tue, 15 Jul 2008 02:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://dougmcinnes.com/?p=14#comment-28</guid>
		<description>&lt;p&gt;Very smart! I&#039;m for sure going to use this on &lt;a href=&quot;http://makingthechain.com&quot; rel=&quot;nofollow&quot;&gt;Making the Chain&lt;/a&gt;. What do you think about a friendlier format like a YML file? Maybe it&#039;s just me but I alway have to read a crontab definition five times to be sure it&#039;ll do what i think it&#039;s going to do.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Very smart! I&#8217;m for sure going to use this on <a href="http://makingthechain.com" rel="nofollow">Making the Chain</a>. What do you think about a friendlier format like a YML file? Maybe it&#8217;s just me but I alway have to read a crontab definition five times to be sure it&#8217;ll do what i think it&#8217;s going to do.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
