Run every hour on weekdays?

518 views
Skip to first unread message

Kristian Andersen

unread,
Dec 28, 2009, 9:43:18 AM12/28/09
to Whenever Gem
Hi

I have a job, which i want to run at an interval on weekdays, but i
can't figure out if its possible. The cron syntax would be something
like this
* */1 * * mon-fri

Further more i also need to perform a job, with an interval, in a
timespan, on certain weekdays e.g.
*/5 7-17 * * tue-sat

Is it possible to define cronjobs like this with whenever? If not, are
there any plans for this in the future?

Best regards
Kristian

Roger Ertesvag

unread,
Jan 1, 2010, 2:21:08 PM1/1/10
to Whenever Gem
Hi,
to run on all weekdays do:

every :weekday, :at => ........

To run on certain days you can do:

every [:tuesday, :wednesday, :thursday, :friday, :saturday], :at
=> ........

There may be a more elegant way of doing this but it should work.


Regards
Roger

On Dec 28 2009, 3:43 pm, Kristian Andersen <kanderse...@gmail.com>
wrote:

Kristian Andersen

unread,
Jan 4, 2010, 6:04:46 AM1/4/10
to Whenever Gem
Hi

Thanks for the reply, but it doesn't really solve my problem.

The problem is that i have multiple different terms that i want to
"use".

e.g. every 5 minutes on every tuesday.

Best regards
Kristian

Javan Makhmali

unread,
Jan 4, 2010, 12:01:30 PM1/4/10
to whenev...@googlegroups.com
Whenever doesn't support for that at this time although it wouldn't be too difficult to get it working. The only thing I can think of for now is to have the job run every 5 minutes and have the job itself check to see if it's Tuesday.

Javan

> --
> You received this message because you are subscribed to the Google
> Groups "Whenever Gem" group and because you're awesome.
> To post to this group, send email to whenev...@googlegroups.com
> To unsubscribe from this group, send email to
> whenever-gem...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/whenever-gem?hl=en

Reply all
Reply to author
Forward
0 new messages