resque-scheduler (4.3.1) bug with rufus-scheduler (3.5.0)
Hi, This happens when it tries to start schedule from scheduler file,
NoMethodError: undefined method `next_time' for nil:NilClass
/app/vendor/bundle/ruby/2.3.0/gems/rufus-scheduler-3.5.0/lib/rufus/scheduler/jobs.rb:640:in `next_time_from'
cron type:
my_job_name:
cron: '/15 * * * *' # every 15 minutes
queue: queue_name
class: ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper
args:
job_class: JobClassName
queue_name: queue_name
description: "This job runs every 15 minutes"
when I locked rufus-scheduler '~> 3.4.2' in gemfile, it was solved
Thanks, Niko
Same for us, ::Fugit::Cron.parse(cronline) in rufus-scheduler 3.5.0 is unable to parse cronline with timezone, like 0 0 * * 1 Etc/GMT-12. Look like a big change in behavior compare to CronLine.new(cronline) in rufus-scheduler 3.4.0
Related has anyone confirmed if * * * * * or * * * * * * works as a job never being scheduled? Our jobs which were to never get scheduled were firing every second. Just rolled back and will investigate more later.
Has anyone figured this out?
still seems to be an issue, I've just bumped into this with rufus-scheduler 3.5.2
Sounds like that should've been a rufus-scheduler 4.0.0 release. As a workaround, resque-scheduler 4.4.1 could require rufus-scheduler ~> 3.2, < 3.5 and resque-scheduler 5.0.0 would use rufus-scheduler ~> 3.5.
But that may break those who've already upgraded to rufus-scheduler 3.5+ and changed their cron lines…
Regarding the specific cases above, it appears the parser just got stricter. But the exception is misleading.
'/15 * * * *' # every 15 minutes
Nonstandard syntax. Should be */15 * * * *
* * * * *or* * * * * *works as a job never being scheduled?
That doesn't work. It means run every minute
Think you'll need to omit the schedule rather than using cron syntax to not run it.
Released fugit 1.2.0. It accepts the non-standard "/15 * * * *".
Released rufus-scheduler 3.6.0 which fails on invalid cron strings, with a better error message.
Fugit is the parsing library used by rufus-scheduler.