Re: [Koha-devel] Not know how to use finesMode
I'll assume you have the circulation and fines rules setup already for overdue fines. Also it sounds like you have Koha version 3, so I'll assume you do. Setting finesMode to "production" is the first step. The next is to make a cron job to run the script "fines.pl" once a day. There is an example cron file included with koha. In the source tree it's misc/cronjobs/crontab.example. In the install tree it's bin/cronjobs/crontab.example. This file is an example for the setup of a scheduled process on a unix style system ( like Linux ). Edit this file to suite your need. A few things to watch out for: For me to get this to work I had to run each process as "root" instead of "koha", on each line I replaced '$KOHA_USER' with 'root' The lines near the top, PERL5LIB, KOHA_CONF, and KOHA_CRON_PATH need to be set to match your install. On the line for fines, you may need to change 'longoverdue.pl' to 'fines.pl' or 'fines2.pl' depending on which version of Koha 3 you have. If you see 'fines.pl' in the bin/cronjobs folder then that is the one to use. Once this is edited to your needs copy or link it to the /etc/cron.d directory. You may have to touch the /etc/crontab file before cron will realize it's there. Once you have the cron job running properly your overdue fines show up the next day. You can watch the system log to see if cron complains about anything while reading the file. Mine now is complaining that the wrong users owns the crontab file. Good luck. On Wed, 2008-10-15 at 17:46 +0200, Rubén Gómez wrote:
Hello everybody. That's my first email so I hope I can express myself.
I want to use the fines Mode but I'm not sure how to put it working. I have gone to "Circulation preferences" and I put the "finesMode" variable to "production", but it doesn't do nothing.
I want to create a fine when anyone don't return a book on time, something like to pay $0,5 each day it overpass the "Specify Due Date". I suppose it must be done with "finesMode" but I don't know how to do it. What about "accruefines cronjob", where can I found it?
I hope you can help me.
Thanks! _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
The example crontab file was altered to make it's examples invalid. They look like lines for cron, not crontab. Please see the original crontab.example: http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=blob;f=misc/cronjobs/crontab... --Joe Atzberger On Wed, Oct 15, 2008 at 12:08 PM, Michael Hafen <mdhafen@tech.washk12.org>wrote:
I'll assume you have the circulation and fines rules setup already for overdue fines. Also it sounds like you have Koha version 3, so I'll assume you do.
Setting finesMode to "production" is the first step. The next is to make a cron job to run the script "fines.pl" once a day. There is an example cron file included with koha. In the source tree it's misc/cronjobs/crontab.example. In the install tree it's bin/cronjobs/crontab.example. This file is an example for the setup of a scheduled process on a unix style system ( like Linux ). Edit this file to suite your need.
A few things to watch out for: For me to get this to work I had to run each process as "root" instead of "koha", on each line I replaced '$KOHA_USER' with 'root' The lines near the top, PERL5LIB, KOHA_CONF, and KOHA_CRON_PATH need to be set to match your install. On the line for fines, you may need to change 'longoverdue.pl' to 'fines.pl' or 'fines2.pl' depending on which version of Koha 3 you have. If you see 'fines.pl' in the bin/cronjobs folder then that is the one to use.
Once this is edited to your needs copy or link it to the /etc/cron.d directory. You may have to touch the /etc/crontab file before cron will realize it's there.
Once you have the cron job running properly your overdue fines show up the next day. You can watch the system log to see if cron complains about anything while reading the file. Mine now is complaining that the wrong users owns the crontab file.
Good luck.
On Wed, 2008-10-15 at 17:46 +0200, Rubén Gómez wrote:
Hello everybody. That's my first email so I hope I can express myself.
I want to use the fines Mode but I'm not sure how to put it working. I have gone to "Circulation preferences" and I put the "finesMode" variable to "production", but it doesn't do nothing.
I want to create a fine when anyone don't return a book on time, something like to pay $0,5 each day it overpass the "Specify Due Date". I suppose it must be done with "finesMode" but I don't know how to do it. What about "accruefines cronjob", where can I found it?
I hope you can help me.
Thanks! _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
I'll assume you have the circulation and fines rules setup already for overdue fines. Also it sounds like you have Koha version 3, so I'll assume you do. Yes, I'm using version 3 on a Debian Testing: Koha 3.00.00.107 Koha DB 3.0000107 Server version: Apache/2.2.9 (Debian) mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2
On Wed, Oct 15, 2008 at 6:08 PM, Michael Hafen <mdhafen@tech.washk12.org> wrote: perl, v5.10.0 Linux 2.6.26-1-686
Setting finesMode to "production" is the first step. The next is to make a cron job to run the script "fines.pl" once a day. Before using a cronjob I want to execute first fines.pl or fines2.pl to know what it does, and after that do the cronjob to execute at night.
I'm having an error when executing those scripts: ruben@QO:/usr/share/koha/bin/cronjobs$ ./fines.pl Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./fines.pl line 36. BEGIN failed--compilation aborted at ./fines.pl line 36. I suppose it's because it doesn't know where C4 is, but I don't know how to tell the script. I have set those variables: PERL5LIB=/usr/share/koha KOHA_CONF=/etc/koha/koha-conf.xml
On the line for fines, you may need to change 'longoverdue.pl' to 'fines.pl' or 'fines2.pl' depending on which version of Koha 3 you have. What's the differences between fines.pl, fines2.pl and fines-ll.pl. What is supposed it must be used?
Thanks!
The variables have to be exported, not just set. I can't comment about the technical difference between different fines scripts: in the current version of Koha they are consolidated into one fines.pl script. Obviously there used to be differences, but it is much better to have one script in common. --joe On Thu, Oct 16, 2008 at 6:06 AM, Rubén Gómez <rugomez@qualityobjects.com>wrote:
I'll assume you have the circulation and fines rules setup already for overdue fines. Also it sounds like you have Koha version 3, so I'll assume you do. Yes, I'm using version 3 on a Debian Testing: Koha 3.00.00.107 Koha DB 3.0000107 Server version: Apache/2.2.9 (Debian) mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2
On Wed, Oct 15, 2008 at 6:08 PM, Michael Hafen <mdhafen@tech.washk12.org> wrote: perl, v5.10.0 Linux 2.6.26-1-686
Setting finesMode to "production" is the first step. The next is to make a cron job to run the script "fines.pl" once a day. Before using a cronjob I want to execute first fines.pl or fines2.pl to know what it does, and after that do the cronjob to execute at night.
I'm having an error when executing those scripts: ruben@QO:/usr/share/koha/bin/cronjobs$ ./fines.pl Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./fines.pl line 36. BEGIN failed--compilation aborted at ./fines.pl line 36.
I suppose it's because it doesn't know where C4 is, but I don't know how to tell the script. I have set those variables: PERL5LIB=/usr/share/koha KOHA_CONF=/etc/koha/koha-conf.xml
On the line for fines, you may need to change 'longoverdue.pl' to 'fines.pl' or 'fines2.pl' depending on which version of Koha 3 you have. What's the differences between fines.pl, fines2.pl and fines-ll.pl. What is supposed it must be used?
Thanks!
participants (3)
-
Joe Atzberger -
Michael Hafen -
Rubén Gómez