[Koha] cleanup_database.pl

Greg Barniskis gregb at scls.lib.wi.us
Thu May 20 04:15:23 NZST 2010


On 5/19/2010 10:34 AM, Christopher Curry wrote:
...
> Here is my crontab:
>
> "0 3 * * 2-6 perl
> /usr/local/src/kohaclone/misc/cronjobs/cleanup_database.pl -v --sessions
> --zebraqueue 10 >>/var/log/koha/cleanup_database.log"
...
>
> Any obvious issues with my configuration? Any ideas how I can make this
> work?

Your crontab example doesn't show you setting the environmental 
variables that may be needed (PERL5LIB and KOHA_CONF). See the examples 
from the web page below and modify the paths as needed for your system. 
You likely have these variables specified for your shell (so running the 
same command from the shell works), but cron needs these values too.

http://wiki.koha.org/doku.php?id=en:development:cronjobs

Also, this may not apply to your OS, but whenever I have cron issues on 
FreeBSD, ensuring that absolute paths are specified can help. So I'd 
personally use "/usr/bin/perl" as the command, not just "perl", or even 
skip that entirely and let the system figure it out from the specified 
script's #! line (again, YMMV with OS flavor).

-- 
Greg Barniskis, Computer Systems Integrator
South Central Library System (SCLS)
<gregb at scls.lib.wi.us>, (608) 242-4716


More information about the Koha mailing list