Make sure that two constants correctly identify the URL and absolute path name of all the files on our Web server.
Section 6.2, “TCC_URL”: This is the common prefix
of all Web pages served from the TCC server, whose real
name is infohost.nmt.edu.
Section 6.3, “TCC_PATH”: The absolute path name
to the directory corresponding to TCC_URL. Because the script generates Web
pages, it assumes that a web page at some path
TCC_PATH + corresponds to URL PTCC_URL +
.
P
The start page generated by this script is not a
standalone page. It is included using a
server-side include from the page at http://www.nmt.edu/tcc/hw/homepage.html. File homepage.g in that
directory, the PyStyler
input file that generates the homepage.html file, contains this SSI
include:
<!--#include virtual="hwscan.html"-->
Therefore, hwscan.html in
that directory must be a soft link to the actual
start page. To create this link:
cd /u/www/docs/tcc/hw ln -l hwscan3/ims3/start/start.html hwscan.html
To execute the script once a day, establish a cron job.
Pick a server that has the lxml
package installed, such as login.
On that server, edit your crontab by issuing this shell command:
crontab -e
In the edit screen that appears, add a line to run the script daily. This example runs the job at 02:30 local time.
30 2 * * * nice /u/www/docs/tcc/hw/hwscan3/ims3/hwscan3.py
Because the script writes its name and version to sys.stderr, the owner of the script should receive
an e-mail every day with the output of the script. This
will include any error messages about machines that are in
LDAP but not known to GetHardware().