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.

  1. Make a directory under your document database account to contain the files in DocDB/scripts ( we'll call it "docdb-scripts" )
  2. cp DocDB/scripts/* docdb-scripts/.
  3. cd docdb-scripts
  4. Check CGIInclude.pm and edit if necessary.
    This will tell the scripts where to find ProjectGlobals.pm, which contains the necessary database information.
  5. Edit DocDBHourly.csh
    This script calls FullList.
    There should be one line for every permission group.
  6. DocDBDaily.csh and DocDBWeekly.csh call NotifyDigest.
  7. Make a directory under your document database account to contain the scripts to make the public listing ( we'll call it "DocDB-Public-scripts" )
  8. cp DocDB/scripts/DocDBHourly.csh DocDB-Public-scripts/.
  9. cd DocDB-Public-scripts
  10. 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
  11. Edit DocDBHourly.csh
    For the public edition, enable ONLY the line that fills $file_root/Static/Lists/FullList.html
  12. 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
        
  13. 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.

DocDB License


Document Database