Showing posts with label fines. Show all posts
Showing posts with label fines. Show all posts

Run Koha cronjob in convenient time

Koha cronjobs are running on midnight. Overdue amount does not calculate by Koha in libraries shutting down Koha server at evening . You can run cronjob in convenient time.

Add following script in cronjob,

Open Applications > Accessories > Terminal

type  

crontab -e

It will ask to select editor to open crontab. Press Enter button to proceed.

Add the following line in crontab editor

15 10 * * * /etc/cron.daily/koha-common

This script run Koha schedules tasks (e.g. fine calculation) every morning 10:15 AM. You can change to convenient time.

Press Ctrl + O to save the changes. Then Ctrl + X exit.

Reference: Crontab example

How to run fines script manually

Most of the libraries have installed Koha on ordinary computers, and they shut them down after working hours. Fine will not be calculated in this context. Fine calculation in Koha occurs at 12 AM midnight. You can manage fine calculation by runningthe  fine calculation script. Here is the method,

Open Applications > Accessories > Terminal

Apply the following commands,

sudo su

export PERL5LIB="/usr/share/koha/lib" 
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"
cd /etc/cron.daily/

./koha-common

Run this script at the opening hour of the library.

Another method is that you can add the following line in a cron job and run the process at a specific time without manual intervention.

Open Applications > Accessories > Terminal

sudo su
crontab -e

Add the following line,

*/20 * * * * /etc/cron.daily/koha-common