Koha How-To

Koha Question of the Week: Can I Tell What Cron Job Made a Change to a Record?

Each Friday, we will bring you a new Koha Question of the Week. We will select real questions that we receive and share the answers with you!

Question: Can I Tell What Cron Job Made a Change to a Record?

Answer: Until relatively recently, action logs could show that a change to a record or item happened via automated cron job in the cataloging log, though not which cron made the change.

A new feature introduced in version 22.11 and backported to 22.05 and 21.11 changes that. Bug 30984 now logs the name of the cron job that made a change. It is not visible in the staff client, but it can be pulled in via report. The column is action_logs.script, and the output in that column will be the format of CronName.pl; a couple common ones that libraries might find useful to report on are automatic_item_modification_by_age.pl and longoverduelost.pl. This would be a new way to check on which items were moved automatically out of new books so staff can check the shelf for stragglers, or if a library wanted to see how many items per day go to long overdue lost status.

Of course, cron jobs touch a number of action log modules, so these are only two possibilities based on report requests, and its usefulness is limited to how long action_logs are kept (typically 180 days).

Additional Resources

Monday Minutes : Using the Logs

Action_logs data via Koha SQL Reports Library