whenever icon indicating copy to clipboard operation
whenever copied to clipboard

Add example of using at option for hourly job to the readme

Open johnavance opened this issue 13 years ago • 1 comments

In your readme you show using the at option for staggering tasks. However, it looks like you are explicitly avoiding showing an example using an hourly task, making it appear that the at option only works when you can fully specify a time of day.

Going by stackoverflow answers, it appears that many people believe that you have to bust down to cron syntax in order to stagger hourly tasks. However, your parse_time function appears to handle either a numeric value or a Time object for offsetted hourly jobs.

A simple example in README.md would fix this:

every :hour, :at => '5' do # Many shortcuts available: :hour, :day, :month, :year, :reboot runner "SomeModel.ladeeda" end

johnavance avatar Oct 04 '13 16:10 johnavance

Note for future viewers of this issue: using :at to specify the minutes after the hour only worked correctly for me when I used an integer rather than a string. So

every :hour, :at => 5 do

worked, but

every :hour, :at => '5' do

did not.

k1w1 avatar Jul 08 '15 19:07 k1w1