Pages

How to run fines script manually

Most of the libraries have installed Koha in ordinary computer and they shut down it after working hours. Fine will not calculate in this context. Fine calculation in Koha occur in 12 AM midnight. You can manage fine calculation by running fine calculation script. Here is the method,

Open Applications > Accessories > Terminal

Apply 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 opening hour of the library.

Another method is that, you can add following line in cronjob and run the process in specific time without manual intervention.

Open Applications > Accessories > Terminal

sudo su
crontab -e

Add following line,

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

16 comments:

  1. I need help... koha not calculating fines when click button renew or return checked items? Why?

    ReplyDelete
    Replies
    1. Koha Administration > Global System Preferences > circulation > Fine Plolicy > Calculate and charge

      Delete
  2. Koha not calculating overdue despite showing item is due and having calculate and charge policy activated. What could be the issue?

    ReplyDelete
  3. Koha not calculating overdue despite showing item overdue and having calculate and charge policy activated and manually running fine.pl. What could be the issue?

    ReplyDelete
    Replies
    1. Open Applications > Accessories > Terminal

      sudo su
      crontab -e

      Add following line,

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

      Delete
    2. Should we add above line daily?

      Delete
  4. Dear Sir,
    Koha Not Show Number of Title Quantity in ( ) Why? Please help

    ReplyDelete
  5. Dear Sir,

    Koha nor show Title Quantity in ( ) Why?

    ReplyDelete
  6. My Koha failed to calculate fines despite setting all preferences correctly. I get the following errors when running the ./fines.pl manually.


    Can't locate Koha.pm in @INC (you may need to install the Koha module) (@INC con tains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/li b/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/ site_perl .) at /etc/perl/C4/Context.pm line 115.
    BEGIN failed--compilation aborted at /etc/perl/C4/Context.pm line 115.
    Compilation failed in require at ./fines.pl line 33.
    BEGIN failed--compilation aborted at ./fines.pl line 33.

    Please help.

    ReplyDelete
    Replies
    1. I have the same problem with you sir, I don't know if someone encounter this error also.

      Delete
    2. Before issuing fines.pl, you must issue first below:
      export KOHA_CONF=
      export PERL5LIB=

      Delete
  7. Fine are not being calculated in my koha. When I run the ./fines.pl manually I get the following error.
    Can't locate C4/Context.pm in @INC (you may need to install the C4::Context module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ./fines.pl line 33.

    Please need help. any suggestion.

    ReplyDelete
    Replies
    1. When I write the following command /usr/share/koha/bin/cronjobs# ./fines.pl in terminal. The following error is coming.

      root@ubuntu:/usr/share/koha/bin/cronjobs# ./fines.pl
      Can't locate C4/Context.pm in @INC (you may need to install the C4::Context module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ./fines.pl line 33.
      BEGIN failed--compilation aborted at ./fines.pl line 33.


      Please help me to solve this problem. Thank you for your help.

      Delete
  8. Mr Kumar Hope u will b fine,sir i have installed koha but i have a problem .problem is i have compile the rules for fine but it does not work and cant calculate the fine against the patrons having over due books.plz guide me how to activate this module to work .

    thanks

    ReplyDelete
  9. Please help

    I try to run fines.pl and this error occur. i dont know what to do

    Can't locate Koha/Caches.pm in @INC (you may need to install the Koha::Caches module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /etc/perl/C4/Context.pm line 94.
    BEGIN failed--compilation aborted at /etc/perl/C4/Context.pm line 94.
    Compilation failed in require at fines.pl line 33.
    BEGIN failed--compilation aborted at fines.pl line 33.

    ReplyDelete