際際滷

際際滷Share a Scribd company logo
Koha Cronjobs
   Joe Atzberger, LibLime




  KohaCon 2009: Plano, TX
misc/cronjobs/
?   advance_notices.pl
?   crontab.example
?   ?nes.pl
?   longoverdue.pl
?   overdue_notices.pl
?   process_message_queue.pl
?   ... and others
rebuild_zebra.pl
          misc/migration_tools/rebuild_zebra.pl

? -a: authorities
? -b: biblios
? -x: XML
? -z: incremental
? -r: CLEAR and REBUILD from scratch
Remember!

? export PERL5LIB=/path/to/kohaclone
? export KOHA_CONF=/path/to/koha-
  conf.xml
Any idiot could give this presentation.
Any idiot could give this presentation.

Allow me to demonstrate!
Any idiot could give this presentation.

Allow me to demonstrate!
Any idiot could give this presentation.

Allow me to demonstrate!

All the info comes from two places:
Any idiot could give this presentation.

Allow me to demonstrate!

All the info comes from two places:
? crontab.example
Any idiot could give this presentation.

Allow me to demonstrate!

All the info comes from two places:
? crontab.example
? run: whatever_job.pl
Any idiot could give this presentation.

Allow me to demonstrate!

All the info comes from two places:
? crontab.example
? run: whatever_job.pl
? or: whatever_job.pl --help
Any idiot could give this presentation.

Allow me to demonstrate!

All the info comes from two places:
? crontab.example
? run: whatever_job.pl
? or: whatever_job.pl --help
  ? OK, well, not everything.
?nes.pl
? No help
? No command-line options either
? sysprefs: ?nesMode, CircControl
? staff: ?nes rules, Calendar!
? TIP: run ?nes before notices
advance_notices.pl

? Like overdue notices, but before due
? ^EnhancedMessagingPreferences ̄ syspref
? Opt-In for individual patrons via OPAC
Building a good cronjob
? Documentation for use case!
? Good perl: use strict; use warnings;
? use Getopt::Long; # handle --options
? use Pod::Usage; # makes --help like perldoc
? internalize, like process_message_queue.pl
? test cases, dry run, operational feedback
The End

More Related Content

Koha Cronjobs

  • 1. Koha Cronjobs Joe Atzberger, LibLime KohaCon 2009: Plano, TX
  • 2. misc/cronjobs/ ? advance_notices.pl ? crontab.example ? ?nes.pl ? longoverdue.pl ? overdue_notices.pl ? process_message_queue.pl ? ... and others
  • 3. rebuild_zebra.pl misc/migration_tools/rebuild_zebra.pl ? -a: authorities ? -b: biblios ? -x: XML ? -z: incremental ? -r: CLEAR and REBUILD from scratch
  • 4. Remember! ? export PERL5LIB=/path/to/kohaclone ? export KOHA_CONF=/path/to/koha- conf.xml
  • 5. Any idiot could give this presentation.
  • 6. Any idiot could give this presentation. Allow me to demonstrate!
  • 7. Any idiot could give this presentation. Allow me to demonstrate!
  • 8. Any idiot could give this presentation. Allow me to demonstrate! All the info comes from two places:
  • 9. Any idiot could give this presentation. Allow me to demonstrate! All the info comes from two places: ? crontab.example
  • 10. Any idiot could give this presentation. Allow me to demonstrate! All the info comes from two places: ? crontab.example ? run: whatever_job.pl
  • 11. Any idiot could give this presentation. Allow me to demonstrate! All the info comes from two places: ? crontab.example ? run: whatever_job.pl ? or: whatever_job.pl --help
  • 12. Any idiot could give this presentation. Allow me to demonstrate! All the info comes from two places: ? crontab.example ? run: whatever_job.pl ? or: whatever_job.pl --help ? OK, well, not everything.
  • 13. ?nes.pl ? No help ? No command-line options either ? sysprefs: ?nesMode, CircControl ? staff: ?nes rules, Calendar! ? TIP: run ?nes before notices
  • 14. advance_notices.pl ? Like overdue notices, but before due ? ^EnhancedMessagingPreferences ̄ syspref ? Opt-In for individual patrons via OPAC
  • 15. Building a good cronjob ? Documentation for use case! ? Good perl: use strict; use warnings; ? use Getopt::Long; # handle --options ? use Pod::Usage; # makes --help like perldoc ? internalize, like process_message_queue.pl ? test cases, dry run, operational feedback