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

func is_valid crashed when checking '*/0 * * * *' cron string #114

Closed
yitian-reevo opened this issue Sep 25, 2018 · 6 comments
Closed

func is_valid crashed when checking '*/0 * * * *' cron string #114

yitian-reevo opened this issue Sep 25, 2018 · 6 comments

Comments

@yitian-reevo
Copy link

yitian-reevo commented Sep 25, 2018

Hi guys.

Accidentally found an issue when using is_valid func with parameter '*/0 * * * *', the expect return is False, while somehow the program crashed.

I actually located where the problem is, it's in croniter.py Line 499. m.group(4) or 1 failed to return 1 when m.group(4) == '0', which then further caused variable step became 0, then it crashed.

Could you please fix this?

@kiorky
Copy link
Collaborator

kiorky commented Sep 25, 2018

Uhm, i need to investigate but your cron line seems invalid for me, so at least its normal that it wont work.

*/0 mean each 0 minutes, division by zero !

@yitian-reevo
Copy link
Author

As a programmer, I totally understand this cron line is invalid, and stupid! But we cannot control that somebody attempts to do this to let their jobs run continually.

Thanks for working on this!

@kiorky
Copy link
Collaborator

kiorky commented Sep 25, 2018

Ok, no problemo, as i said i ll look how to make croniter not crash.
I wanted just to be clear on the invalidness of the expression.
thx for reporting !

@kiorky kiorky closed this as completed in e2d918e Jan 27, 2019
@kiorky
Copy link
Collaborator

kiorky commented Jan 27, 2019

@yitian-reevo
Copy link
Author

yitian-reevo commented Jan 28, 2019

Fabulous! Thanks.

@kiorky
Copy link
Collaborator

kiorky commented Jan 28, 2019

Better later than never ^^ :).

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