Difference between revisions of "SUNScholar/Daily Admin"
Jump to navigation
Jump to search
| Line 4: | Line 4: | ||
</center> | </center> | ||
| − | == | + | ==[[SUNScholar/Daily Admin/3.2|For DSpace 3.2]]== |
| − | + | Click on the heading above. | |
| − | + | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Sample crontab for DSpace <= 1.8.2 (superseded, see above)=== | ===Sample crontab for DSpace <= 1.8.2 (superseded, see above)=== | ||
Revision as of 10:38, 6 February 2014
Back to After Installation Tasks
Contents
For DSpace 3.2
Click on the heading above.
Sample crontab for DSpace <= 1.8.2 (superseded, see above)
Edit the crontab, by typing the following in a terminal:
su - dspace
crontab -e
If asked to select an editor, choose nano
Remove all the contents by pressing CTL+k repeatedly, then add the following lines using the copy and paste functions of firefox and nano:
Replace %myadmin@repo.ac.za% with the email address of the person to receive system admin email.
# m h dom mon dow command MAILTO="%myadmin@repo.ac.za%" ### Setup embargoes before enabling this ### ### After embargoes are setup, remove the hash to enable embargo checking ### ### See wiki customisation page for setup details ### ### http://wiki.lib.sun.ac.za/index.php/SUNScholar/Embargo_Systems ### ## Check for lifted embargos ## #05 0 * * * /home/dspace/bin/dspace embargo-lifter -a -v ##The above option is made available with DSpace 3.2 only #10 0 * * * /home/dspace/bin/dspace embargo-lifter -l -v #15 0 * * * /home/dspace/bin/dspace embargo-lifter -c -v ### See wiki customisation page for setup details ### ### http://wiki.lib.sun.ac.za/index.php/SUNScholar/Browse_Indexes ### ## Update item search and browse indexes ## 0 3 * * * /home/dspace/bin/dspace index-update ### See wiki customisation page for setup details ### ### http://wiki.lib.sun.ac.za/index.php/SUNScholar/SOLR_Statistics ## ## SOLR stats update ## @daily /home/dspace/bin/dspace stats-util -b -r @weekly /home/dspace/bin/dspace stats-util -o @monthly /home/dspace/bin/dspace stats-util -u -m -i -f ### See wiki customisation page for setup details ### ### http://wiki.lib.sun.ac.za/index.php/SUNScholar/SOLR_Discovery ### ## SOLR discovery update ## @daily /home/dspace/bin/dspace update-discovery-index @weekly /home/dspace/bin/dspace update-discovery-index -o @monthly /home/dspace/bin/dspace update-discovery-index -c ## Generate sitemaps for Google indexing ## 0 6 * * * /home/dspace/bin/dspace generate-sitemaps ## Item counts ## @hourly /home/dspace/bin/dspace itemcounter ## Send out subscription e-mails ## 0 1 * * * /home/dspace/bin/dspace sub-daily ## Run the media filter ## ## This is setup to run weekly to reduce server load ## ## It can be setup to run nightly if you want ## @weekly /home/dspace/bin/dspace filter-media ## Bitstream checks ## @weekly /home/dspace/bin/dspace checker-emailer -a @monthly /home/dspace/bin/dspace checker -p -l @monthly /home/dspace/bin/dspace cleanup -v ### The following are not needed if using the new SOLR stats above ### ## Run stat analyses ## #10 1 * * * /home/dspace/bin/dspace stat-general #20 1 * * * /home/dspace/bin/dspace stat-monthly ## Run stat analyses reports ## #10 2 * * * /home/dspace/bin/dspace stat-report-general #20 2 * * * /home/dspace/bin/dspace stat-report-monthly
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Step 3. Create "postgres" user crontab
PostgreSQL also benefits from regular 'vacuuming', which optimizes the indexes and clears out any deleted data.
Type as follows in a terminal:
sudo -i
Enter the "dspace" user password. Then type:
su - postgres
crontab -e
Copy and paste the following:
20 4 * * * vacuumdb --analyze dspace > /dev/null 2>&1
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
References
- https://github.com/DSpace/demo.dspace.org/blob/master/scripts/linux/crontab
- https://wiki.duraspace.org/display/DSDOC4x/Scheduled+Tasks+via+Cron
- https://wiki.duraspace.org/display/DSDOC3x/Installation#Installation-'cron'Jobs
- https://wiki.duraspace.org/display/DSDOC18/Installation#Installation-'cron'Jobs
- https://wiki.duraspace.org/display/DSDOC17/Installation#Installation-'cron'Jobs
- http://en.wikipedia.org/wiki/Cron
- http://adminschoice.com/crontab-quick-reference