using whenever gem for scheduling a job every hour on Sunday
ruby-on-rails, scheduled-tasks, whenever
Solution
You could do something like that
every '0 * * * 7' do
#...
end
The '0 * * * 7' part is cron syntax:
0 - minutes
first asterisk - every hour
second asterisk - every day
third asterisk - every month
7 - on sundays (7th day of the week)
EDIT - For more detailed information regarding cron tasks syntax, a very clear article can be found here: http://www.thesitewizard.com/general/set-cron-job.shtml
Problem
We are using whenever gem on our rails project and there is one task that need to be run every hour but only on the day of the sunday. I understand that i can schedule tasks on hourly basis , by something like this: ``` every 1.hour do # do something end ``` and i also understand that i can schedule it for a particular time on sunday: ``` every :sunday, :at => "11:00pm" do #do something end ``` what i am looking for is some syntax to schedule this task for every hour on sunday.