About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:automation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
administration:automation [2018/12/19 17:19] demiankatzadministration:automation [2022/10/13 14:13] – [Using cron] demiankatz
Line 20: Line 20:
 If you need to automate tasks under Linux, you will want to become familiar with the cron process.  This allows you to schedule programs to run at specific intervals, either as root or as a particular user.  The details of using cron are beyond the scope of this document, but there are many helpful resources available elsewhere.  The [[http://en.wikipedia.org/wiki/Cron|Wikipedia page on the subject]] is probably a good starting point. If you need to automate tasks under Linux, you will want to become familiar with the cron process.  This allows you to schedule programs to run at specific intervals, either as root or as a particular user.  The details of using cron are beyond the scope of this document, but there are many helpful resources available elsewhere.  The [[http://en.wikipedia.org/wiki/Cron|Wikipedia page on the subject]] is probably a good starting point.
  
-=== cron-friendly VuFind script ===+=== cron-friendly Solr script ===
  
-If you try to run the standard vufind.sh script to restart VuFind from within cron, you may run into problems.  The context in which VuFind runs may be wrong, and the attempted output to the TTY may cause unexpected failures.  If you have trouble, try adding this script (you can call it vufind_cron.sh) to your VuFind home directory: +If you want to restart VuFind's Solr instance via cron, the best thing is to set it up as a system service that can be restarted with systemctl or an equivalent commandSee [[administration:starting_and_stopping_solr#running_solr_automatically|Running Solr Automatically]] for details on how to set up Solr as a service.
- +
-<code bash> +
-#!/bin/sh +
- +
-# Disable JETTY_CONSOLE output -- it causes problems when run by cron: +
-export JETTY_CONSOLE=/dev/null +
- +
-# Pass parameters along to vufind.sh: +
-CURRENTPATH=`dirname $0` +
-cd $CURRENTPATH +
-$CURRENTPATH/vufind.sh $* +
-</code> +
- +
-Important:  Note that because of the way CURRENTPATH is determined, this script only works if it is in the same directory as vufind.sh!+
  
 === Why restart VuFind? === === Why restart VuFind? ===
  
-The main reason to regularly restart the VuFind is to ensure system stability.  Due to the way Java garbage collection works, Solr can eventually run out of memory and stop responding; periodic restarts are an easy way to avoid this problem.  It is also a good idea to investigate [[administration:performance#java_tuning|Java tuning]] to address the root cause -- but even with a well-tuned system, occasional restarts (such as, on a weekly basis) can help ensure long-term stability.+The main reason to regularly restart the VuFind Solr instance is to ensure system stability.  Due to the way Java garbage collection works, Solr can eventually run out of memory and stop responding; periodic restarts are an easy way to avoid this problem.  It is also a good idea to investigate [[administration:performance#java_tuning|Java tuning]] to address the root cause -- but even with a well-tuned system, occasional restarts (such as, on a weekly basis) can help ensure long-term stability.
 ==== Using mysqldump ==== ==== Using mysqldump ====
  
Line 470: Line 456:
 </code> </code>
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
administration/automation.txt · Last modified: 2023/03/06 20:48 by demiankatz