Summary: | Cronjobs should log their start and command line parameters before processing options | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Command-line Utilities | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, martin.renvoize, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes all cronjobs so that if they fail because of bad parameters, information is now available in the log viewer to help with troubleshooting (when the CronjobLog system preference is enabled).
Notes:
- This changed all the cronjobs in misc/cronjobs that had the 'cronlogaction'.
- It also changed misc/maintenance/fix_invalid_dates.pl (not a cronjob, but now only logs if confirmed - similar to misc/import_patrons.pl).
- For misc/cronjobs/purge_suggestions.pl, a verbose option was added for consistency.
|
Version(s) released in: | |
Circulation function: | |||
Attachments: |
Bug 38857: Update cronjobs to log run before processing parameters
Bug 38857: Update cronjobs to log run before processing parameters Bug 38857: Update cronjobs to log run before processing parameters Bug 38857: (QA follow-up) Fix perltidy errors |
Description
Nick Clemens (kidclamp)
2025-01-09 19:59:46 UTC
Created attachment 176304 [details] [review] Bug 38857: Update cronjobs to log run before processing parameters A few notes: - I grabbed this list by looking for things in misc/ that had cronlogaction - I didn't touch scripts that aren't in the cronjobs directory, except fix_invalid_dates where I follow import_patrons and only log if confirmed since they aren't crons, I figure this seems reasonable - purge_suggestions I moved the logggin up and changed the addition of effective days to a verbose message - this seems more consistent To test: 1 - Enable CronjobLog 2 - On command line: perl misc/cronjobs/cleanup_database.pl --old_reservers 550 3 - Error on command line 4 - In staff client, go to Tools->Log viewer, check 'Cronjobs' and submit 5 - No entries 6 - Apply patch 7 - Repeat and see run is logged with wrong parameter 8 - Fix parameter and confirm 9 - Spot check other files until you are satisfied 10 - Sign it off! Created attachment 176369 [details] [review] Bug 38857: Update cronjobs to log run before processing parameters A few notes: - I grabbed this list by looking for things in misc/ that had cronlogaction - I didn't touch scripts that aren't in the cronjobs directory, except fix_invalid_dates where I follow import_patrons and only log if confirmed since they aren't crons, I figure this seems reasonable - purge_suggestions I moved the logggin up and changed the addition of effective days to a verbose message - this seems more consistent To test: 1 - Enable CronjobLog 2 - On command line: perl misc/cronjobs/cleanup_database.pl --old_reservers 550 3 - Error on command line 4 - In staff client, go to Tools->Log viewer, check 'Cronjobs' and submit 5 - No entries 6 - Apply patch 7 - Repeat and see run is logged with wrong parameter 8 - Fix parameter and confirm 9 - Spot check other files until you are satisfied 10 - Sign it off! Signed-off-by: William Lavoie <william.lavoie@inLibro.com> Created attachment 176370 [details] [review] Bug 38857: Update cronjobs to log run before processing parameters A few notes: - I grabbed this list by looking for things in misc/ that had cronlogaction - I didn't touch scripts that aren't in the cronjobs directory, except fix_invalid_dates where I follow import_patrons and only log if confirmed since they aren't crons, I figure this seems reasonable - purge_suggestions I moved the logggin up and changed the addition of effective days to a verbose message - this seems more consistent To test: 1 - Enable CronjobLog 2 - On command line: perl misc/cronjobs/cleanup_database.pl --old_reservers 550 3 - Error on command line 4 - In staff client, go to Tools->Log viewer, check 'Cronjobs' and submit 5 - No entries 6 - Apply patch 7 - Repeat and see run is logged with wrong parameter 8 - Fix parameter and confirm 9 - Spot check other files until you are satisfied 10 - Sign it off! Signed-off-by: William Lavoie <william.lavoie@inLibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 176371 [details] [review] Bug 38857: (QA follow-up) Fix perltidy errors Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed for 25.05! Well done everyone, thank you! |