On Tue, Jul 1, 2008 at 11:12 PM, Byron Wright <bslayerw at gmail.com>
wrote:> Hi,
>
> I''m attempting to setup a cron style scheduling for a method and
cannot seem
> to get this to work as expected. I''m trying to call this method
every
> morning at 2:00 am week days only (not on sat and sun). This is the config
> that never triggers.
>
> :schedules:
> :scheduled_worker:
> :do_at_two_weekdays_only:
> :trigger_args: 0 0 2 * * 1-5 *
>
Well, I was trying to fix these things and reproduce the problem, but
i do not see the problem.I have added these test cases for checking
out issues:
specify "should run for weekdays " do
t_time = Time.parse("Wed Feb 13 20:53:43 +0530 2008")
a = BackgrounDRb::CronTrigger.new("0 0 2 * * 1-5 *")
firetime = a.fire_after_time(t_time)
firetime.hour.should == 2
firetime.min.should == 0
firetime.sec.should == 0
firetime.wday.should == 4
t_time = Time.parse("Fri June 6 20:53:43 +0530 2008")
a = BackgrounDRb::CronTrigger.new("0 0 2 * * 1-5 *")
firetime = a.fire_after_time(t_time)
firetime.hour.should == 2
firetime.min.should == 0
firetime.sec.should == 0
firetime.wday.should == 1
end
It works as expected. Can i see your worker code?