Last updated | 2002-07-03 16:12:14 EDT |
Doc Title | Setting up cron jobs for DLXS |
Author 1 | Snavely, Cory |
Author 2 | Farber, Phillip |
CVS Revision | $Revision: 1.7 $ |
All DLXS classes use session management, with session files that need to be occasionally purged. The managesession.pl script is supplied as a tool to help with this maintenance task.
The syntax of the managesession.pl program options is:
managesession.pl [-a age] -m [clean|list] -s [File|MySQL]where
- -a signifies the maximum age of session inactivity in minutes
- -m signifies the mode
- clean will remove sessions that exceed the specified age
- list will simlpy list the sessions that exceed the specified age
- -s signifies the data store
- File indicates a file-based (CSV) data store
- MySQL indicates a MySQL-based data store
You must add a crontab entry to clear the session files. For example, the following crontab entry will run hourly, removing data for sessions that have not been accessed in 120 minutes. Replace the string $DLXSROOT
with the DLXSROOT for your installation.
The default SESSION_AGE
value is 120 minutes.
# # clear old web sessions from DLXS sessions database 51 * * * * (DLXSROOT=$DLXSROOT; export DLXSROOT; $DLXSROOT/bin/managesessions.pl -m clean -a 120 -s File)
The DLXS Text Class uses a cache directory for dynamically converted page images. When using Text Class and page images (e.g., with tif2gif
), unless you have enough disk space to keep all converted page images (an approach that can improve performance), you should also add a crontab entry for clearing the converted image files. We recommend that you add the following lines to the root crontab to clear cached/converted image files. It will remove cached page images that have not been accessed in a number of days ($CACHE_AGE
). Replace the strings $CACHE_AGE
and $DLXSROOT
, below, with an acceptable page image lifetime and the DLXSROOT for your installation, respectively.
# # clear temporary files and dirs from DLXS page cache 23 1 * * * find $DLXSROOT/web/*/*/*cvtdir \( -name '*.gif' -o -name '*.pdf' \) -type f -atime +$CACHE_AGE -exec rm {} \; 23 5 * * * find $DLXSROOT/web/*/*/*cvtdir -depth -type d -links 2 -exec rmdir -ps {} \;