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

Log when cronjob ends? #48

Closed
jayaich opened this issue Nov 17, 2019 · 7 comments
Closed

Log when cronjob ends? #48

jayaich opened this issue Nov 17, 2019 · 7 comments

Comments

@jayaich
Copy link
Contributor

jayaich commented Nov 17, 2019

A problem which seems to crop up every so often is determining if a cron job has ended. I took a quick look to see if such an option was available, and found that an old Debian version of anacron supported the '-L' option. ('-L 2' would log when a job finished.) Looking further it seems that this option is still maintained in Debian 10, but is provided by a (somewhat large) patch applied to an older anacron. So basically this is a Debian extension.

I am curious as to why cronie does not seem to support the ability to log when jobs end. I would be willing to look into providing this ability (although probably not quite like the '-L' option. Using it on a Debian server the PID numbers were out of step, and made it a bit difficult to see when a job ended), but wondered if this idea had already been considered and rejected.

Thanks.

@t8m
Copy link
Member

t8m commented Nov 18, 2019

Do you want the logging in crond, anacron or both?

@jayaich
Copy link
Contributor Author

jayaich commented Nov 18, 2019

I would have said both. Regardless of when the job started, via crond or anacron, it can be useful to know when it ends.

@t8m
Copy link
Member

t8m commented Nov 19, 2019

From top of my head I do not see any problem with adding such logging. Of course you might find that it would be too hard to find a right place for that code, but I would not expect that.

@jayaich
Copy link
Contributor Author

jayaich commented Nov 19, 2019

Okay, a little confused here... are you asking me to do the coding or is it something you are going to do? I have no problem with taking a look at it, but when you asked where I wanted the logging I took it as something you were considering to do.

@t8m
Copy link
Member

t8m commented Nov 20, 2019

I could look at it eventually but if you want to help pull requests are always welcome.

@jayaich
Copy link
Contributor Author

jayaich commented Nov 20, 2019

Okay, I'll take a look. I'll submit a PR when I have something (hopefully) usable.

@t8m
Copy link
Member

t8m commented Nov 9, 2020

This is already fixed.

@t8m t8m closed this as completed Nov 9, 2020
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