DocDB Listing and Notification
The FullList and NotifyDigest scripts run outside the CGI environment.
FullList creates a list of all the documents in the database for each
permission group. This allows faster access to the complete list of documents.
NotifyDigest mails notices to users who have signed up for email
notification of document changes in the DocDB database instance.
These scripts must run as cron jobs.
- Make a directory under your document database account to contain
the files in DocDB/scripts ( we'll call it "docdb-scripts" )
- cp DocDB/scripts/* docdb-scripts/.
- cd docdb-scripts
- Check CGIInclude.pm and edit if necessary.
This will tell the scripts where to find ProjectGlobals.pm,
which contains the necessary database information.
- Edit DocDBHourly.csh
This script calls FullList.
There should be one line for every permission group.
- DocDBDaily.csh and DocDBWeekly.csh call NotifyDigest.
- Make a directory under your document database account to contain
the scripts to make the public listing ( we'll call it "DocDB-Public-scripts" )
- cp DocDB/scripts/DocDBHourly.csh DocDB-Public-scripts/.
- cd DocDB-Public-scripts
- Make some links
ln -s ../docdb-scripts/FullList FullList
ln -s ../docdb-scripts/CGIInclude.pm CGIInclude.pm
ln -s /full/path/to/public/DocDB/ProjectGlobals.pm ProjectGlobals.pm
- Edit DocDBHourly.csh
For the public edition, enable ONLY the line that
fills $file_root/Static/Lists/FullList.html
- setup cron jobs to run the scripts (use crontab -e)
00 * * * * cd docdb-scripts; ./DocDBHourly.csh
15 * * * * cd DocDB-Public-scripts; ./DocDBHourly.csh
05 0 * * * cd docdb-scripts; ./DocDBDaily.csh > /dev/null
10 0 * * 0 cd docdb-scripts; ./DocDBWeekly.csh > /dev/null
- These cron jobs populate the lists used by DocDB to
efficiently list all documents and provide the information
used by the e-mail notification scripts.
Document Database