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

Specifying cron for a scheduled task #366

Closed
mohierf opened this issue Jan 20, 2017 · 7 comments
Closed

Specifying cron for a scheduled task #366

mohierf opened this issue Jan 20, 2017 · 7 comments
Assignees
Milestone

Comments

@mohierf
Copy link

mohierf commented Jan 20, 2017

I declared some NSCA checks in scheduled tasks and I trid to use the cron parameter but when I set a value like 10,25,40,55 * * * * the nscp test --validate raise an exception for the Scheduler:

schedule Exception in failed to load Scheduler: : Invalid value: 0,15,30,45

It look like if the NSClient did not handled the 10,25,40,55 as the cron minute but as minute,hour,day,month ?

What is the expected syntax to run a command several times on every hour at different minutes? Anyway, is it possible ?

@mickem
Copy link
Owner

mickem commented Jan 24, 2017

Yes, the cron parser is currently very rudimentary and only supports single numbers...

@mickem mickem self-assigned this Jan 24, 2017
@mickem mickem added this to the 0.6.0 milestone Jan 24, 2017
@mohierf
Copy link
Author

mohierf commented Jan 24, 2017

This is what I supposed. Did you schedule something for this very interesting feature? At least for a list of minutes in the hour. I would really appreciate defining a schedule for specific minutes in the hour 😉

@mickem
Copy link
Owner

mickem commented Jan 24, 2017

For sure...

This was simply a quick "first version" so next version will add some more modifiers...

@mohierf
Copy link
Author

mohierf commented Jan 24, 2017

Any scheduled date for this next version? Any chance in the next few days/weeks? I am currently setting up a new deployment for several hundred of hosts and I would like to know if I install the current version of NSClient or I still wait...

@mickem
Copy link
Owner

mickem commented Jan 28, 2017

I would say it wont make the 0.5.1 version which will have a release candidate in the next few days (need to run some test to make sur the installer is correct). So possibly beta versions in maybe a month then releases in a month or so after that.

However if there is something specific you need I might be convinced to do an exception and see if I can get it into 0.5.1

@mohierf
Copy link
Author

mohierf commented Jan 28, 2017

Thanks @mickem. My only request would be to use such syntax: 10,25,40,55 * * * * to schedule on the minutes in an hour. This will allow to tun a check 4 times in an hour on specific minutes 😉

mickem added a commit that referenced this issue Jan 29, 2017
@mickem
Copy link
Owner

mickem commented Feb 1, 2017

This should work n the latest 0.5.1 build.

@mickem mickem closed this as completed Feb 1, 2017
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