Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Making a cron Job File

Quote Reply
Making a cron Job File
Does anyone know how I can make one and install it etc?

I am told it is for a unix server.
Quote Reply
Re: Making a cron Job File In reply to
What do you want to do with the job file and, do you have telnet access to the shell?

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
goodstufflists.home.ml.org/


Quote Reply
Re: Making a cron Job File In reply to
Here is how I did it.

1. Create a text file that is stored where ever you want it in your directory structure. I suggest it is in an area without browser access. Here is mine, which I named, "build-links.sh":

Quote:
# Remove Goodstuff files before rebuild
rm /home/bobsie/web/goodstuff/admin/backup/*
rm /home/bobsie/web/goodstuff/New/*

# Rebuild new Goodstuff Lists pages and log actions
/home/bobsie/web/goodstuff/admin/nph-build.cgi > /home/bobsie/web/goodstuff/admin/build_links.log

The file deletes the current backup file (it will be recreated) and all the "What's New" files (which will also be recreated). Once that is done, it then changes to the links admin directory and executes nph-build.cgi.

2. Create a second file, which I call "mycron.txt" and put it anywhere you want as in 1. above. Mine looks like this:

Quote:
# (Re)Build the Links HTML Files for Bob's Good Stuff Lists,
# Visitor Contributed Links, and the Diabetes Bookstore.
# Occurs every 6 hours at:
# 1 & 7 a.m and p.m., PT; 4 & 10 a.m. and p.m., ET
0 1,7,13,19 * * * /home/bobsie/bin/build_links.sh

instead of "0 1,7,13,19 * * *", since you want to run this every 5 minutes, you would put "0/5 0 * * *" (I think that is the right syntax -- type "man cron" or "man crontab" at a shell prompt to double check). Make sure the path points to the file you created in 1. above.

3. At the shell prompt, type "crontab mycron.txt". That will load the file into the cron table for your user name. You can double check it by typing "crontab -l" (lowercase L, not 1) and it should show the entry that you typed in mycron.txt. If it doesn't, you didn't do something right.

All of this assumes you are on a UNIX/Linux system. If all of this fails, please consult your ISP for the correct way to add an entry to your cron table.

The above files can be created offline and then uploaded, via ftp, in ASCII mode.

I hope this helps.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
goodstufflists.home.ml.org/




[This message has been edited by Bobsie (edited January 09, 1999).]
Quote Reply
Re: Making a cron Job File In reply to
Basically the job file is to tell the server to update a page every 5 mins.

I have Telnet and Shell access.

However I don't think I have access to the Unix server to create the file. I am looking for a web bot or something that can be set up to visit the page every 5 mins.

Martin
Quote Reply
Re: Making a cron Job File In reply to
I forgot, if you know how to set one up then please advise.

Quote Reply
Re: Making a cron Job File In reply to
Thanks. I will look into this and hopefully get it working

Martin