Date: Thu, 28 Mar 2024 16:56:47 -0400 (EDT) Message-ID: <384024714.28928.1711659407412@lyrasis1-roc-mp1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_28927_600976342.1711659407411" ------=_Part_28927_600976342.1711659407411 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Several DSpace features require that a script i= s run regularly (via cron, or similar). Some of these features includ= e:
These regularly scheduled tasks should be setup via either c= ron (for Linux/Mac OSX) or Windows T= ask Scheduler (for Windows).
If you are on Linux or Mac OSX, you should add these cron settin= gs under the OS account which is running Tomcat (and owns the [dspace] inst= allation directory). For example, login as that user and typ= e the following to edit the user's crontab.
crontab= -e
While every DSpace installation is unique, in order to get the most out = of DSpace, we highly recommend enabling these basic cron settings (the sett= ings are described in the comments):
## SAMP= LE CRONTAB FOR A PRODUCTION DSPACE ## You obviously may wish to tweak this for your own installation,=20 ## but this should give you an idea of what you likely wish to schedule via= cron. ## ## NOTE: You may also need to add additional sysadmin related tasks to your= crontab=20 ## (e.g. zipping up old log files, or even removing old logs, etc). #----------------- # GLOBAL VARIABLES #----------------- # Full path of your local DSpace Installation (e.g. /home/dspace or /dspace= or similar) # MAKE SURE TO CHANGE THIS VALUE!!! DSPACE =3D [dspace] # Shell to use SHELL=3D/bin/sh # Add all major 'bin' directories to path PATH=3D/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # Set JAVA_OPTS with defaults for DSpace Cron Jobs. # Only provides 512MB of memory by default (which should be enough for most= sites). JAVA_OPTS=3D"-Xmx512M -Xms512M -Dfile.encoding=3DUTF-8" #-------------- # HOURLY TASKS (Recommended to be run multiple times per day, if possible) # At a minimum these tasks should be run daily. #-------------- # Regenerate DSpace Sitemaps every 8 hours (12AM, 8AM, 4PM).=20 # SiteMaps ensure that your content is more findable in Google, Google Scho= lar, and other major search engines. 0 0,8,16 * * * $DSPACE/bin/dspace generate-sitemaps > /dev/null #---------------- # DAILY TASKS=20 # (Recommended to be run once per day. Feel free to tweak the scheduled tim= es below.) #---------------- # Update the OAI-PMH index with the newest content at midnight every day # NOTE: ONLY NECESSARY IF YOU ARE RUNNING OAI-PMH=20 # (This ensures new content is available via OAI-PMH) 0 0 * * * $DSPACE/bin/dspace oai import > /dev/null # Clean and Update the Discovery indexes at midnight every day # (This ensures that any deleted documents are cleaned from the Discovery s= earch/browse index) 0 0 * * * $DSPACE/bin/dspace index-discovery > /dev/null # run the index-authority script once a day at 12:45 to ensure the Solr Aut= hority cache is up to date 45 0 * * * $DSPACE/bin/dspace index-authority > /dev/null # Cleanup Web Spiders from DSpace Statistics Solr Index at 01:00 ever= y day # NOTE: ONLY NECESSARY IF YOU ARE RUNNING SOLR STATISTICS # (This removes any known web spiders from your usage statistics) 0 1 * * * $DSPACE/bin/dspace stats-util -i # Send out subscription e-mails at 02:00 every day # (This sends an email to any users who have "subscribed" to a Collection, = notifying them of newly added content.) 0 2 * * * $DSPACE/bin/dspace sub-daily # Run the media filter at 03:00 every day.=20 # (This task ensures that thumbnails are generated for newly add images,=20 # and also ensures full text search is available for newly added PDF/Word/P= PT/HTML documents) 0 3 * * * $DSPACE/bin/dspace filter-media # Run any Curation Tasks queued from the Admin UI at 04:00 every day # (Ensures that any curation task that an administrator "queued" from the A= dmin UI is executed=20 # asynchronously behind the scenes) 0 4 * * * $DSPACE/bin/dspace curate -q admin_ui #---------------- # WEEKLY TASKS=20 # (Recommended to be run once per week, but can be run more or less frequen= tly, based on your local needs/policies) #---------------- # Run the checksum checker at 04:00 every Sunday # By default it runs through every file (-l) and also prunes old results (-= p)=20 # (This re-verifies the checksums of all files stored in DSpace. If any fil= es have been changed/corrupted, checksums will differ.) 0 4 * * 0 $DSPACE/bin/dspace checker -l -p # NOTE: LARGER SITES MAY WISH TO USE DIFFERENT OPTIONS. The above "-l" opti= on tells DSpace to check *everything*.=20 # If your site is very large, you may need to only check a portion of your = content per week. The below commented-out task # would instead check all the content it can within *one hour*. The next we= ek it would start again where it left off. #0 4 * * 0 $DSPACE/bin/dspace checker -d 1h -p # Mail the results of the checksum checker (see above) to the configured "m= ail.admin" at 05:00 every Sunday. # (This ensures the system administrator is notified whether any checksums = were found to be different.) 0 5 * * 0 $DSPACE/bin/dspace checker-emailer #---------------- # MONTHLY TASKS # (Recommended to be run once per month, but can be run more or less freque= ntly, based on your local needs/policies) #---------------- # Permanently delete any bitstreams flagged as "deleted" in DSpace, on the = first of every month at 01:00 # (This ensures that any files which were deleted from DSpace are actually = removed from your local filesystem.=20 # By default they are just marked as deleted, but are not removed from the= filesystem.)=20 0 1 1 * * $DSPACE/bin/dspace cleanup > /dev/null #---------------- # YEARLY TASKS (Recommended to be run once per year) #---------------- # At 2:00AM every January 1, "shard" the DSpace Statistics Solr index.=20 # This ensures each year has its own Solr index, which improves performance= . # NOTE: ONLY NECESSARY IF YOU ARE RUNNING SOLR STATISTICS # NOTE: This is scheduled here for 2:00AM so that it happens *after* the da= ily cleaning of this index. 0 2 1 1 * $DSPACE/bin/dspace stats-util -s