![]() | LinkScan Reference Manual | Section 8 |
Previous Contents Next | Help Reference HowTo Card |
The following example is provided to assist those users who wish to run LinkScan as a cron job. The crontab system is a standard Unix utility that enables jobs to be executed automatically according to some regular schedule. On most Unix systems, see man crontab or man 5 crontab for help.
Save any existing configured cron jobs to a file (for example, cron.job) using the following shell command:
crontab -l > cron.job
Edit the file cron.job and append an additional entry for LinkScan containing something like:
40 8 * * 0,1,2,3,4,5,6 /usr/linkscan/linkscan.cron
This will execute /usr/linkscan/linkscan.cron at 08:40am each day. Adjust the pathname to linkscan.cron accordingly.
Submit this to the crontab system with the following shell command:
crontab cron.job
You can check that it's been scheduled with:
crontab -l
Edit the linkscan.cron file -- the following example file is automatically installed in the LinkScan directory:
#!/bin/sh # Set current working directory cd /usr/linkscan/ # Execute LinkScan /usr/local/bin/perl linkscan.pl -project proja /usr/local/bin/perl linkscan.pl -project projb
Please note the following points:
You must set execute permissions on this file -- chmod 755 linkscan.cron
You must explicitly set the current working directory to the LinkScan directory before executing LinkScan.
You must specify the Project name on the command line to prevent LinkScan from prompting the (absent) user to select a Project.
crontabs are normally executed with minimal path/environment settings so you may need to initialize some things explicitly that are normally handled by your .login, .profile, .cshrc files. That is why the above example includes the full pathname to the perl executable since it is not safe to assume that /usr/local/bin/ has been included in the crontab PATH.
LinkScan Reference Manual. Section 8. Scheduling LinkScan on Unix Systems
LinkScan Version 9.0
© Copyright 1997-2001
Electronic Software Publishing Corporation (Elsop)
LinkScan and Elsop are Trademarks of Electronic Software Publishing Corporation
Previous Contents Next | Help Reference HowTo Card |