]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/crontab.example
LP#1243023: Clean up string handling variable types
[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 */15 * * * *   . ~/.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 # Run the pending user purger
46 30 2  * * *   . ~/.bashrc && $EG_BIN_DIR/purge_pending_users.srfsh
47
48 # create the list of blocked patrons for offline use
49 # Note: The resulting list.txt file needs to be copied to all Apache servers
50 30 6  * * *   . ~/.bashrc && $EG_BIN_DIR/offline-blocked-list.pl $SRF_CORE > $OPENILS/var/web/standalone/list.txt
51
52 # Restart SIP nightly to free up any orphaned processes.  
53 # Note: Run on all SIP servers
54 # 5  2  * * *   . ~/.bashrc && oils_ctl.sh -d $OPENILS/var/pid -s $OPENILS/conf/oils_sip.xml -a stop_sip
55 # 8  2  * * *   . ~/.bashrc && oils_ctl.sh -d $OPENILS/var/pid -s $OPENILS/conf/oils_sip.xml -a start_sip
56
57 # Run the circ history cleanup job
58 # Note: destroys link between user and item
59 #2  0  * * *   . ~/.bashrc && $EG_BIN_DIR/clear_expired_circ_history.srfsh
60
61 # Run the hard due date updater
62 2  3  * * *   . ~/.bashrc && $EG_BIN_DIR/update_hard_due_dates.srfsh
63
64 # Action/Trigger entries ----
65
66 # Runs all pending A/T events every half hour
67 */30 * * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending
68
69 # Passive A/T event generation.
70 # Note: push these back to 3am so they will run after the fine generator and spread out the start minute to reduce dogpiling
71 0 * * * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly
72 5 3 * * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily
73 10 3 * * 1-5 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays
74 15 3 * * 0   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly
75 20 3 1 * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly
76 25 3 1 1 *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly
77
78 # Legacy overdue/predue notice generator.  Change to suit.
79 #XML_FILE_PREFIX = /openils/var/data/overdue/overdue
80 #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
81
82 # TODO: add other entries
83