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

Error when update crontab #766

Open
eduanttunes opened this issue Jan 3, 2019 · 1 comment
Open

Error when update crontab #766

eduanttunes opened this issue Jan 3, 2019 · 1 comment

Comments

@eduanttunes
Copy link

eduanttunes commented Jan 3, 2019

By executing the whenever --update-crontab command, the following error returns:

/usr/lib/ruby/vendor_ruby/whenever/cron.rb:132:in `parse_as_string': Couldn't parse: 31557600 (ArgumentError)
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:112:in `parse_time'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:50:in `time_in_cron_syntax'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:42:in `output'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:36:in `block (2 levels) in output'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:35:in `each'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:35:in `block in output'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:34:in `each'
	from /usr/lib/ruby/vendor_ruby/whenever/cron.rb:34:in `output'
	from /usr/lib/ruby/vendor_ruby/whenever/job_list.rb:151:in `block (2 levels) in cron_jobs'
	from /usr/lib/ruby/vendor_ruby/whenever/job_list.rb:147:in `each'
	from /usr/lib/ruby/vendor_ruby/whenever/job_list.rb:147:in `block in cron_jobs'
	from /usr/lib/ruby/vendor_ruby/whenever/job_list.rb:146:in `each'
	from /usr/lib/ruby/vendor_ruby/whenever/job_list.rb:146:in `cron_jobs'
	from /usr/lib/ruby/vendor_ruby/whenever/job_list.rb:65:in `generate_cron_output'
	from /usr/lib/ruby/vendor_ruby/whenever.rb:10:in `cron'
	from /usr/lib/ruby/vendor_ruby/whenever/command_line.rb:54:in `whenever_cron'
	from /usr/lib/ruby/vendor_ruby/whenever/command_line.rb:106:in `updated_crontab'
	from /usr/lib/ruby/vendor_ruby/whenever/command_line.rb:35:in `run'
	from /usr/lib/ruby/vendor_ruby/whenever/command_line.rb:6:in `execute'
	from /usr/bin/whenever:41:in `<main>'

My schedule.rb file:

every 1.year do
  rake "maintenances:renew"
end

Any ideas?

@benlangfeld
Copy link
Collaborator

Which versions of Ruby and ActiveSupport?

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

2 participants