Monthly Cron on specific day

27 views
Skip to first unread message

CoreyM

unread,
Nov 15, 2009, 8:52:26 AM11/15/09
to Whenever Gem
Hi, Is there anyway to run the monthly cron on a specific day/time. in
this case I'd like to run monhtly tasks on the 2nd of the month, not
the first.

Thanks,

CM

Javan Makhmali

unread,
Nov 16, 2009, 10:21:29 AM11/16/09
to whenev...@googlegroups.com
Hey Corey, it's a little ugly, but you can do something like:

every 1.month, :at => "January 2nd at 5pm"

And it will run every month (not just January) on the 2nd day at 5pm. Whenever uses the Chronic gem to parse dates/times and it doesn't have nice way to say "the 2nd" so you have to provide a month name (which Whenever then ignores).
Reply all
Reply to author
Forward
0 new messages