Skip to content

Commit

Permalink
Fix issues with scripts container
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Apr 26, 2024
1 parent e3797ef commit b1d07ad
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
10 changes: 5 additions & 5 deletions bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ while getopts ":d:" opt; do
done

# This is the full script as entered and may include a directory name
# relative to Library Simplified directory/circulation/bin.
# relative to circulation/bin.
SCRIPT_PATH="$1"

if [[ -z "$SCRIPT_PATH" ]]; then
Expand All @@ -54,11 +54,11 @@ pidfile=$piddir/$SCRIPT_NAME.pid
logdir=/var/log/simplified
logfile=$logdir/$SCRIPT_NAME.log

# Assume this run file is in bin/
# unless the Library Simplified directory has been set as an environment
# variable $PALACE_DIR
# Assume this run file is in bin/ unless the Palace directory has been set
# as an environment variable $PALACE_DIR. If it hasn't been set, we'll
# assume the main Palace directory is one level up from the bin directory.
if [[ -z "$PALACE_DIR" ]]; then
PALACE_DIR=$(dirname "$0")
PALACE_DIR=$(dirname "$(dirname "$(readlink -f "$0")")")
fi

create_dir () {
Expand Down
76 changes: 38 additions & 38 deletions docker/services/cron/cron.d/circulation
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# /etc/cron.d/circulation: Library Simplified Circulation Manager crontab
# /etc/cron.d/circulation: Palace Manager crontab
# You don't have to run the `crontab' command to install the new
# version when you edit this file in /etc/cron.d. Files in this directory
# also have username fields, similar to the systemwide /etc/crontab.
Expand All @@ -11,100 +11,100 @@ HOME=/var/www/circulation

# These scripts update internal caches.
#
*/30 * * * * root core/bin/run -d 15 search_index_refresh >> /var/log/cron.log 2>&1
10 0 * * * root core/bin/run search_index_clear >> /var/log/cron.log 2>&1
0 0 * * * root core/bin/run update_custom_list_size >> /var/log/cron.log 2>&1
0 2 * * * root core/bin/run update_lane_size >> /var/log/cron.log 2>&1
*/30 * * * * root core/bin/run -d 5 equivalent_identifiers_refresh >> /var/log/cron.log 2>&1
*/30 * * * * root bin/run -d 15 search_index_refresh >> /var/log/cron.log 2>&1
10 0 * * * root bin/run search_index_clear >> /var/log/cron.log 2>&1
0 0 * * * root bin/run update_custom_list_size >> /var/log/cron.log 2>&1
0 2 * * * root bin/run update_lane_size >> /var/log/cron.log 2>&1
*/30 * * * * root bin/run -d 5 equivalent_identifiers_refresh >> /var/log/cron.log 2>&1

# These scripts improve the bibliographic information associated with
# the collections.
#
30 3 * * * root core/bin/run update_nyt_best_seller_lists >> /var/log/cron.log 2>&1
30 3 * * * root bin/run update_nyt_best_seller_lists >> /var/log/cron.log 2>&1

# If any works are missing presentation editions, add them.
0 */3 * * * root core/bin/run work_presentation_editions >> /var/log/cron.log 2>&1
0 */3 * * * root bin/run work_presentation_editions >> /var/log/cron.log 2>&1

# If any works are missing up-to-date classifications, classify them
0 */3 * * * root core/bin/run work_classification >> /var/log/cron.log 2>&1
0 */3 * * * root bin/run work_classification >> /var/log/cron.log 2>&1

# If any works are classified under unprocessed subjects, reclassify
# those works.
30 22 * * * root core/bin/run work_classify_unchecked_subjects >> /var/log/cron.log 2>&1
30 22 * * * root bin/run work_classify_unchecked_subjects >> /var/log/cron.log 2>&1

# Remove miscellaneous expired things from the database
0 2 * * * root core/bin/run database_reaper >> /var/log/cron.log 2>&1
0 2 * * * root bin/run database_reaper >> /var/log/cron.log 2>&1

# Sync a library's collection with NoveList
0 0 * * 0 root core/bin/run -d 60 novelist_update >> /var/log/cron.log 2>&1
0 0 * * 0 root bin/run -d 60 novelist_update >> /var/log/cron.log 2>&1

# Generate MARC files for libraries that have a MARC exporter configured.
0 3,11 * * * root core/bin/run cache_marc_files >> /var/log/cron.log 2>&1
0 3,11 * * * root bin/run cache_marc_files >> /var/log/cron.log 2>&1

# The remaining scripts keep the circulation manager in sync with
# specific types of collections.

# Axis 360
#
*/15 * * * * root core/bin/run axis_monitor >> /var/log/cron.log 2>&1
0 4 * * * root core/bin/run axis_reaper >> /var/log/cron.log 2>&1
*/15 * * * * root bin/run axis_monitor >> /var/log/cron.log 2>&1
0 4 * * * root bin/run axis_reaper >> /var/log/cron.log 2>&1

# Bibliotheca
#
*/15 * * * * root core/bin/run bibliotheca_monitor >> /var/log/cron.log 2>&1
0 */5 * * * root core/bin/run bibliotheca_purchase_monitor >> /var/log/cron.log 2>&1
0 5 * * * root core/bin/run bibliotheca_circulation_sweep >> /var/log/cron.log 2>&1
*/15 * * * * root bin/run bibliotheca_monitor >> /var/log/cron.log 2>&1
0 */5 * * * root bin/run bibliotheca_purchase_monitor >> /var/log/cron.log 2>&1
0 5 * * * root bin/run bibliotheca_circulation_sweep >> /var/log/cron.log 2>&1

# Overdrive
#
0 3 * * * root core/bin/run overdrive_new_titles >> /var/log/cron.log 2>&1
*/15 * * * * root core/bin/run overdrive_monitor_recent >> /var/log/cron.log 2>&1
*/15 * * * * root core/bin/run overdrive_reaper >> /var/log/cron.log 2>&1
0 4 * * * root core/bin/run overdrive_format_sweep >> /var/log/cron.log 2>&1
0 3 * * * root bin/run overdrive_new_titles >> /var/log/cron.log 2>&1
*/15 * * * * root bin/run overdrive_monitor_recent >> /var/log/cron.log 2>&1
*/15 * * * * root bin/run overdrive_reaper >> /var/log/cron.log 2>&1
0 4 * * * root bin/run overdrive_format_sweep >> /var/log/cron.log 2>&1

# Enki
#
0 0 1 * * root core/bin/run enki_reaper >> /var/log/cron.log 2>&1
0 */6 * * * root core/bin/run enki_import >> /var/log/cron.log 2>&1
0 0 1 * * root bin/run enki_reaper >> /var/log/cron.log 2>&1
0 */6 * * * root bin/run enki_import >> /var/log/cron.log 2>&1

# OPDS For Distributors
#
0 0 2 * * root core/bin/run opds_for_distributors_reaper_monitor >> /var/log/cron.log 2>&1
0 4 * * * root core/bin/run opds_for_distributors_import_monitor >> /var/log/cron.log 2>&1
0 0 2 * * root bin/run opds_for_distributors_reaper_monitor >> /var/log/cron.log 2>&1
0 4 * * * root bin/run opds_for_distributors_import_monitor >> /var/log/cron.log 2>&1

# Vanilla OPDS 1.x
#
0 5 * * * root core/bin/run opds_import_monitor >> /var/log/cron.log 2>&1
0 5 * * * root bin/run opds_import_monitor >> /var/log/cron.log 2>&1

# Vanilla OPDS 2.x
#
30 5 * * * root core/bin/run opds2_import_monitor >> /var/log/cron.log 2>&1
30 5 * * * root bin/run opds2_import_monitor >> /var/log/cron.log 2>&1

# OPDS 1.x + ODL
#
15 * * * * root core/bin/run odl_import_monitor >> /var/log/cron.log 2>&1
0 */8 * * * root core/bin/run odl_hold_reaper >> /var/log/cron.log 2>&1
15 * * * * root bin/run odl_import_monitor >> /var/log/cron.log 2>&1
0 */8 * * * root bin/run odl_hold_reaper >> /var/log/cron.log 2>&1

# OPDS 2.x + ODL import
#
45 * * * * root core/bin/run odl2_import_monitor >> /var/log/cron.log 2>&1
45 * * * * root bin/run odl2_import_monitor >> /var/log/cron.log 2>&1

# SAML
#
0 5 * * * root core/bin/run saml_monitor >> /var/log/cron.log 2>&1
0 5 * * * root bin/run saml_monitor >> /var/log/cron.log 2>&1

# Rotate the patron auth JWE access token key daily
#
0 3 * * * root core/bin/run rotate_patron_auth_key >> /var/log/cron.log 2>&1
0 3 * * * root bin/run rotate_patron_auth_key >> /var/log/cron.log 2>&1

# Notifications
#
10 */8 * * * root core/bin/run loan_notifications >> /var/log/cron.log 2>&1
15 */8 * * * root core/bin/run hold_notifications >> /var/log/cron.log 2>&1
0 1 * * * root core/bin/run patron_activity_sync_notifications >> /var/log/cron.log 2>&1
10 */8 * * * root bin/run loan_notifications >> /var/log/cron.log 2>&1
15 */8 * * * root bin/run hold_notifications >> /var/log/cron.log 2>&1
0 1 * * * root bin/run patron_activity_sync_notifications >> /var/log/cron.log 2>&1

# Audiobook playtimes
# Every 12 hours, but spaced after hour 8 to reduce job cluttering
0 8,20 * * * root core/bin/run playtime_summation >> /var/log/cron.log 2>&1
0 8,20 * * * root bin/run playtime_summation >> /var/log/cron.log 2>&1
# On the 2nd of every month
0 4 2 * * root core/bin/run playtime_reporting >> /var/log/cron.log 2>&1
0 4 2 * * root bin/run playtime_reporting >> /var/log/cron.log 2>&1

0 comments on commit b1d07ad

Please sign in to comment.