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

Suddenly rake aborted #48

Closed
fastuser opened this issue May 5, 2016 · 2 comments
Closed

Suddenly rake aborted #48

fastuser opened this issue May 5, 2016 · 2 comments

Comments

@fastuser
Copy link

fastuser commented May 5, 2016

I have just installed this plugin, I did some testing with the cron rake task and all seemed OK. Now 2 days later it seems to fail (could have been right away, not sure)

root@linux:/opt/bitnami/apps/redmine/htdocs# sudo rake redmine:check_periodictasks RAILS_ENV="production"
assigning test periodic task
rake aborted!
FloatDomainError: Infinity
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:33:in `ceil'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:33:in `block in checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:3:in `checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/tasks/periodictask.rake:11:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine:check_periodictasks
(See full trace by running task with --trace)
@fastuser
Copy link
Author

fastuser commented May 5, 2016

This is my crontab:

* 3 * * * /var/backups/redmine-backup.sh > /home/bitnami/redminebu.rpt
*/10 * * * * cd /opt/bitnami/apps/redmine/htdocs/; rake redmine:check_periodictasks RAILS_ENV="production" > /home/bitnami/redminePT.rpt

@jperelli
Copy link
Owner

Thanks for the report, I'm seeng that this is because in some place it is dividing by zero, then trying to call .ceil over Infinity. The problem seems to be here https://github.com/jperelli/Redmine-Periodic-Task/blob/master/lib/scheduled_tasks_checker.rb#L42

So when interval_number == 0, this problem arises. Will fix using an if

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

No branches or pull requests

2 participants