module PoolParty module Resources =begin rdoc == Cron The cron resource will set cron jobs at the intervals you set == Usage has_cron(:name => '...') do # More options. # This block is optional end == Options * name The name of the cronjob * user The users who owns the cronjob * command The cronjob command to run * minute Set the minute of the cronjob * hour Set the hour of the cronjob * month Set the month of the cronjob * monthday Set the day of the month of the cronjob * weekday Set the weekday of the cronjob, in 0-6 format, where 0 is Sunday == Example has_cron(:name => "report mailer", :minute => "5", :hour => "0", :weekday => 1) do command "/bin/sh /home/user/email_reports.sh" end =end class Cron < Resource default_options( :command => nil, :user => "root", :minute => "*", :hour => "*", :month => "*", :weekday => "*" ) def present :create end def absent :delete end end end end