Next / Previous / Contents / TCC Help System / NM Tech homepage

2.3.  crontab setup

At this writing, the homepage is periodically rebuilt from user john's user crontab on the infohost server. It must be run on this server in order to have read-write access to the /u/www/ filesystem.

To install a cron job to run this script periodically:

  1. Login to infohost.

  2. Display the old user crontab using this command:

    crontab -l
    

  3. Edit the user crontab using this command:

    crontab -e
    

    This brings up the user's editor of choice.

  4. Make sure there is a line in the table with this format:

    0 4 * * * (cd /u/www/docs/tcc;rm homepagelist.html;\
        nice python homelist.py >homepagelist.html)
    

    This runs the script every morning at 4am, niced down.

Here is the homelist.g file that PyStyler uses to build the homelist.html page containing the list of user homepages:

<head>
  <author>John Shipman, <tt>tcc-doc@nmt.edu</tt></author>
  <updated date="$Date: 2007/12/13 23:16:06 $">
</head>

<p>Here is a list of TCC users who have put up Web homepages.
It is sorted by login name; to find the login name for a
person, see <r id="users">.

<!--#include virtual="homepagelist.html"-->

This page uses a server-side include to insert the file generated by the make homelist target.