Using crontab to keep your web site updated

You must obtain instructor's permission before using crontab.


In your Waldorf account that holds your CVS repository, create a folder named www.

Then create a project named www in your CVS repository as described in the cvs administrator setup instructions.  Import your web site files into this new project as described.

Navigate to your home directory and then checkout the project with the command
    cvs co www

Double check the file permissions and be sure you can view your web site with a web browser.

Create an executable unix script file named checkoutweb
    #!/bin/csh
    cvs co www

Using the crontab command (see man page), create a crontab entry:
    n * * * * checkoutweb

Where n is a positive integer less than 59 assigned to your team by the instructor.  The n specifies that at n minutes after every hour the checkoutweb script is to be executed to automatically checkout your current cvs pages and put them in your www directory.  Do NOT put an asterisk for the first parameter, as that will cause your script to run every minute, which causes the system admins to get very upset about the load we are putting on the system and they will turn off crontab so nobody can use it.

Now team members may make revisions to your web pages under CVS control and the modifications will be automatically used to refresh your web site every half hour.
 

In a similar manner you can create a script to perform other tasks you would like carried out on a periodic basis, such as:



CPE 308 home