run tasks every hour on every Tuesday?

21 views
Skip to first unread message

Łukasz Włodarczyk

unread,
May 7, 2013, 12:54:33 PM5/7/13
to rufus...@googlegroups.com
Hi,

how to run tasks every hour on every Tuesday?

I have cron job for every Tuesday at 13 pm:

#every tuesday at 13 o'clock
scheduler.cron '00 13 * * 2' do
   print "test"
end

I would like to run task on every hour at Tuesday. Would it be possible? Or do I have to create for every hour the task. In this case 24 tasks only for Tuesday.

Thanks for your help
Lukasz

John Mettraux

unread,
May 7, 2013, 4:53:24 PM5/7/13
to rufus...@googlegroups.com
Hello Łukasz,

welcome to the rufus-scheduler mailing list.

On a GNU/Linux or OSX machine you can fire up a terminal and hit "man 5
crontab", it will describe how to use a crond crontab, which rufus-scheduler
tries to mimic for its cron jobs.

For example:

```
# every tuesday every hour from 0600 to 2200
scheduler.cron '0 6-22 * * 2' do
print "hourly test"
end
```

You can use commas and dashes.


Best regards,

--
John Mettraux - http://lambda.io/jmettraux

Reply all
Reply to author
Forward
0 new messages