]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/crontab.example
Merge Dan Wells' changes to the serial schema from the
[working/Evergreen.git] / Open-ILS / examples / crontab.example
1 # Evergreen crontab.example
2 # Author: Joe Atzberger, ESI
3 # Author: Bill Erickson, ESI
4 #
5 # This is an example of a crontab file for Debian.  It may not work 
6 # in other versions of crontab, like on Solaris 8 or BSD, for example.
7
8 # While similar in structure, 
9 # this is NOT an example for cron (as root).  Cron takes an extra
10 # argument per line to designate the user to run as.  You could 
11 # reasonably extrapolate the needed info from here though.
12 #
13 # WARNING: These jobs will do things like charge fines, send
14 # potentially VERY MANY emails to patrons and even debar offending
15 # users.  DO NOT RUN OR SCHEDULE these jobs without being sure you
16 # really intend to.  Make sure the relevant message templates are
17 # configured to your liking before scheduling messages to be sent.
18 #
19 # Except where indicated, these processes only need to run 
20 # on 1 Evergreen server/brick.
21
22
23 # ENVIRONMENT:
24 # First, establish Evergreen ENV variables.
25 #
26 OPENILS    = /openils
27 SRF_CORE   = /openils/conf/opensrf_core.xml
28 EG_BIN_DIR = /openils/bin
29
30 # crontab format:
31 # m h dom mon dow   command
32
33 # Run the hold targeter
34 * */4 * * *   . ~/.bashrc && $EG_BIN_DIR/hold_targeter.pl $SRF_CORE
35
36 # Run the hold thawer
37 5  0  * * *   . ~/.bashrc && $EG_BIN_DIR/thaw_expired_frozen_holds.srfsh
38
39 # Generate fines
40 30 0  * * *   . ~/.bashrc && $EG_BIN_DIR/fine_generator.pl $SRF_CORE
41
42 # Run the reshelving completer
43 2  0  * * *   . ~/.bashrc && $EG_BIN_DIR/reshelving_complete.srfsh
44
45 # create the list of blocked patrons for offline use
46 # Note: The resulting list.txt file needs to be copied to all Apache servers
47 30 6  * * *   . ~/.bashrc && $EG_BIN_DIR/offline-blocked-list.pl $SRF_CORE > $OPENILS/var/web/standalone/list.txt
48
49 # Restart SIP nightly to free up any orphaned processes.  
50 # Note: Run on all SIP servers
51 # 5  2  * * *   . ~/.bashrc && oils_ctl.sh -d $OPENILS/var/pid -s $OPENILS/conf/oils_sip.xml -a stop_sip
52 # 8  2  * * *   . ~/.bashrc && oils_ctl.sh -d $OPENILS/var/pid -s $OPENILS/conf/oils_sip.xml -a start_sip
53
54 # Action/Trigger entries ----
55
56 # Runs all pending A/T events every half hour
57 0 */2 * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending
58
59 # Passive A/T event generation.
60 # Note: the --granularity flag is not supported in 1.6
61 # Note: passive event defs with no granularity will be processed regardless of any granularity flags
62 # Note: push these back to 3am so they will run after the fine generator and spread out the start minute to reduce dogpiling
63 0 * * * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly
64 5 3 * * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily
65 10 3 * * 1-5 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays
66 15 3 * * 0   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly
67 20 3 1 * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly
68 25 3 1 1 *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly
69
70 # Legacy overdue/predue notice generator.  Change to suit.
71 #XML_FILE_PREFIX = /openils/var/data/overdue/overdue
72 #0 3 * * * . ~/.bashrc && cd $EG_BIN_DIR && ./generate_circ_notices.pl --osrf_config $SRF_CORE --notice-types overdue,predue --generate-global-templates --send-email > $XML_FILE_PREFIX.$(date +"\%F").xml
73
74
75 # TODO: add other entries
76