Monday Minutes: Cron Jobs

Nick Clemens, a developer with ByWater Solutions, joins Kelly and Jessie to talk about Cron jobs.

What is a Cron Job?

A cron job is a background task that you have asked the Koha server to do for you. These usually are processes that can be done automatically by a cron and less manual work will need to be done by the library staff. A couple of good examples of cron jobs that libraries use, cancelling expired holds, sending out overdue notices, and running the automatic renewals.

Here is a list of all Koha Cron jobs - which can be found in the manual.

Another place to find out more about cron jobs is in Github. This is a great place to reference when a library would like to know a bit more about the cron job and how it can be altered.

System Preferences

All the system preferences that are controlled by a cron, will have a note that includes details about the cron job and that it does need to be turned on at the server level for this process (system preference) to work. For example:

Action Logs

If your Cron Jobs are being logged, through the System Preference, CronJobLog. You can find out when a cron job ran in your system. Here is a list of the cron jobs that are logged to be seen in the action logs:

misc/cronjobs/advance_notices.pl:cronlogaction();
misc/cronjobs/automatic_checkin.pl:cronlogaction();
misc/cronjobs/automatic_item_modification_by_age.pl:cronlogaction();
misc/cronjobs/automatic_renewals.pl:cronlogaction();
misc/cronjobs/batch_anonymise.pl:cronlogaction();
misc/cronjobs/build_browser_and_cloud.pl:cronlogaction();
misc/cronjobs/cart_to_shelf.pl:cronlogaction();
misc/cronjobs/cleanup_database.pl:cronlogaction() unless $confirm;
misc/cronjobs/cloud-kw.pl:cronlogaction();
misc/cronjobs/delete_patrons.pl:cronlogaction();
misc/cronjobs/fines.pl: cronlogaction( $message );
misc/cronjobs/fines.pl:cronlogaction();
misc/cronjobs/gather_print_notices.pl:cronlogaction();
misc/cronjobs/holds/auto_unsuspend_holds.pl:cronlogaction();
misc/cronjobs/holds/build_holds_queue.pl:cronlogaction();
misc/cronjobs/holds/cancel_expired_holds.pl:cronlogaction();
misc/cronjobs/holds/cancel_unfilled_holds.pl:cronlogaction();
misc/cronjobs/holds/holds_reminder.pl:cronlogaction();
misc/cronjobs/longoverdue.pl:cronlogaction();
misc/cronjobs/membership_expiry.pl:cronlogaction();
misc/cronjobs/overdue_notices.pl:cronlogaction() unless $test_mode;
misc/cronjobs/patron_emailer.pl:cronlogaction();
misc/cronjobs/plugins_nightly.pl:cronlogaction();
misc/cronjobs/process_message_queue.pl:cronlogaction();
misc/cronjobs/purge_suggestions.pl: cronlogaction( " ( days: $days )");
misc/cronjobs/reconcile_balances.pl:cronlogaction();
misc/cronjobs/runreport.pl:cronlogaction();
misc/cronjobs/serialsUpdate.pl:cronlogaction();
misc/cronjobs/share_usage_with_koha_community.pl:cronlogaction();
misc/cronjobs/staticfines.pl:cronlogaction();
misc/cronjobs/update_totalissues.pl:cronlogaction();

Deep Diving on Cron Jobs

We have done a lot of Monday Minutes about functionality in Koha that does require a cron job to be activated. Here is a list of Monday Minutes and other blog posts that can give a library more information about a specific cron job.

Cron Jobs: Batch Anonymize

Cron Jobs: Overdue Notices

Cron Jobs: Run Report

Monday Minutes: Flexibility with the Long Overdue Cron

Setting Up Auto Renewals with New Features

Monday Minutes: Automatic Item Modification By Age

Monday Minutes : Sharing Usage through Hea