SUNScholar/Daily Admin/1.8.X

Back to Daily Admin

Step 1. Login
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S01 Click on the link above to find out how to login to the server and then return here.

Step 2. Create "dspace" user crontab
Edit the crontab, by typing the following in a terminal:

su - dspace

crontab -e If asked to select an editor, choose nano

Sample crontab (superseded by 3.2 daily admin)
MAILTO="root"
 * 1) m h  dom mon dow   command


 * 1) Setup embargoes before enabling this ###
 * 2) After embargoes are setup, remove the hash to enable embargo checking ###
 * 3) See wiki customisation page for setup details ###
 * 4) http://wiki.lib.sun.ac.za/index.php/SUNScholar/Embargo_Systems ###
 * 5) Check for lifted embargos ##
 * 6) 05 0 * * *     $HOME/bin/dspace embargo-lifter -a -v
 * 7) The above option is made available with DSpace 3.2 only
 * 8) 10 0 * * *     $HOME/bin/dspace embargo-lifter -l -v
 * 9) 15 0 * * *     $HOME/bin/dspace embargo-lifter -c -v

0 3 * * *      $HOME/bin/dspace index-update
 * 1) See wiki customisation page for setup details ###
 * 2) http://wiki.lib.sun.ac.za/index.php/SUNScholar/Browse_Indexes ###
 * 3) Update item search and browse indexes ##

@daily         $HOME/bin/dspace stats-util -b -r @weekly        $HOME/bin/dspace stats-util -o @monthly       $HOME/bin/dspace stats-util -u -m -i -f
 * 1) See wiki customisation page for setup details ###
 * 2) http://wiki.lib.sun.ac.za/index.php/SUNScholar/SOLR_Statistics ##
 * 3) SOLR stats update ##

@daily         $HOME/bin/dspace update-discovery-index @weekly        $HOME/bin/dspace update-discovery-index -o @monthly       $HOME/bin/dspace update-discovery-index -c
 * 1) See wiki customisation page for setup details ###
 * 2) http://wiki.lib.sun.ac.za/index.php/SUNScholar/SOLR_Discovery ###
 * 3) SOLR discovery update ##

0 6 * * *      $HOME/bin/dspace generate-sitemaps
 * 1) Generate sitemaps for Google indexing ##

@hourly		$HOME/bin/dspace itemcounter
 * 1) Item counts ##

0 1 * * *      $HOME/bin/dspace sub-daily @weekly	       $HOME/bin/dspace filter-media -n -v
 * 1) Send out subscription e-mails ##
 * 1) Run the media filter ##
 * 2) This is setup to run weekly to reduce server load ##
 * 3) It can be setup to run nightly if you want ##

@weekly        $HOME/bin/dspace checker-emailer -a @monthly       $HOME/bin/dspace checker -p -l @monthly 	$HOME/bin/dspace cleanup -v
 * 1) Bitstream checks ##


 * 1) The following are not needed if using the new SOLR stats above ###
 * 2) Run stat analyses ##
 * 3) 10 1 * * *     $HOME/bin/dspace stat-general
 * 4) 20 1 * * *     $HOME/bin/dspace stat-monthly


 * 1) Run stat analyses reports ##
 * 2) 10 2 * * *     $HOME/bin/dspace stat-report-general
 * 3) 20 2 * * *     $HOME/bin/dspace stat-report-monthly

System Log
To enable logging of cron events, edit the following file: sudo nano /etc/rsyslog.d/50-default.conf Enable the cron log, see example below: auth,authpriv.*                /var/log/auth.log cron.*                         -/var/log/cron.log
 * 1) First some standard log files.  Log by facility.
 * 1) First some standard log files.  Log by facility.
 * .*;auth,authpriv.none         -/var/log/syslog

Now restart the syslog service as follows: sudo service rsyslog restart