-
Notifications
You must be signed in to change notification settings - Fork 192
Update cron format docs #365
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
Conversation
c.sh.AddJob(j) | ||
err = c.sh.AddJob(j) | ||
if err != nil { | ||
c.logger.Debugf("Unable to add new exec job %s from config: %v", name, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... the error was supposed to be logged inside AddJob
function. Let me try to reproduce this
@@ -52,7 +52,7 @@ command = touch /tmp/example | |||
|
|||
|
|||
[job-service-run "service-executed-on-new-container"] | |||
schedule = 0,20,40 * * * * | |||
schedule = 0,20,40 * * * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This schedule actually had 5 elements, as expected
schedule = 0,20,40 * * * | |
schedule = 0,20,40 * * * * |
### INI-file example | ||
|
||
```ini | ||
[job-service-run "service-executed-on-new-container"] | ||
schedule = 0,20,40 * * * * | ||
schedule = 0,20,40 * * * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schedule = 0,20,40 * * * | |
schedule = 0,20,40 * * * * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, it might make sense to implement some kind of detection of wrong cron format and discard last *
for backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably make sense to do this:
Footnotes
Superseded by #366 |
Hi,
I noticed that you updated the
cron
package on the 0.4.0-beta version. Unlike the old cron package robfig/cron/v1 does the new cron package robfig/cron/v3 no longer support seconds in the format.I've also added logs to all instances where new jobs are created since the error produced was not logged anywhere.
closes #351