Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message when scheduling an invalid cron line #289

Closed
jmettraux opened this issue Apr 21, 2019 · 0 comments
Closed

Unhelpful error message when scheduling an invalid cron line #289

jmettraux opened this issue Apr 21, 2019 · 0 comments
Assignees

Comments

@jmettraux
Copy link
Owner

require 'rufus-scheduler'

s = Rufus::Scheduler.new

s.cron '/15 * * * *' do
  p :nada
end

#s.join

results in

/Users/jmettraux/w/rufus-scheduler/lib/rufus/scheduler/jobs.rb:686:in `next_time_from': undefined method `next_time' for nil:NilClass (NoMethodError)
	from /Users/jmettraux/w/rufus-scheduler/lib/rufus/scheduler/jobs.rb:696:in `set_next_time'
	from /Users/jmettraux/w/rufus-scheduler/lib/rufus/scheduler/jobs.rb:655:in `initialize'
	from /Users/jmettraux/w/rufus-scheduler/lib/rufus/scheduler.rb:620:in `new'
	from /Users/jmettraux/w/rufus-scheduler/lib/rufus/scheduler.rb:620:in `do_schedule'
	from /Users/jmettraux/w/rufus-scheduler/lib/rufus/scheduler.rb:227:in `cron'
	from t.rb:7:in `<main>'

This is not helpful at all.

As seen in resque/resque-scheduler#649

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant