cancel
Showing results for 
Search instead for 
Did you mean: 

Help with CRON

N/A

Help with CRON

I run a rugby club discussion board http://ccgi.johnkett.force9.co.uk/cgi-bin/discus/discus.pl?pg=topics

I have set up an F9 mail box so that users can e mail posts to the board. I'm trying to get a crontask setup and have a cron hook working to find the script at

http://ccgi.johnkett.force9.co.uk/cgi-bin/discus/cron-email.pl

I'm not great using Telnet but can get in and when I run crontab -e it gives me an editor. My problem is putting in the command and saving it. I can't wotk out the commands despite copious reading and can't get anything saved.

Any advice appreciated
I'm better at FTP is there any way via that route or can anyone help. This is a task hopefully I'll necer need to do again
5 REPLIES
Community Veteran
Posts: 4,729
Registered: 04-04-2007

Help with CRON

This tutorial may help;
http://usertools.plus.net/tutorials/id/1

Chilly
Marteknet
Grafter
Posts: 577
Registered: 13-10-2007

Re: Help with CRON

Quote

I'm not great using Telnet but can get in and when I run crontab -e it gives me an editor. My problem is putting in the command and saving it. I can't wotk out the commands despite copious reading and can't get anything saved.


I guess you understand how crontab works as you have got as far as trying to -e it. There is an easier way to do all this. Write the crontab table in notepad with each line as need. Making sure that the path to your script is correct.

This example will call a script every ten minutes
MAILTO=cron@martek.f9.co.uk
*/10 * * * * /usr/local/bin/php /files/home#/username/scriptname.php

save this file ending with .tab then upload it via FTP in ASC to the root of the ccgi server.

then telnet the ccgi sever
login and type "crontab -r" to clear any current settings
type "crontab -l" to check that the crontab table is indeed empty
then type "crontab filename.tab" with filename being what you called the file.
lastly type "crontab -l" and you should see telnet list all your crontab settings.

note the -l is a lowercase L not an uppercase i

I hope this helps.
N/A

Help with CRON

Thanks your post helps my understanding but still can't get it working. I think its to do with the location of the script cron-email.cgi. I'm getting a Script Execution Error: config.*** location error [1]. but when I started all this I got a cronhook. The file appears to be where it should be though. I'll recheck again. I'm sure its something simple and basic. I am getting adept at crontab though every cloud..........
Marteknet
Grafter
Posts: 577
Registered: 13-10-2007

Help with CRON

Will your script work if you call it direct from a browser ?
N/A

Help with CRON

the instructions from my discussion board were to set up a file called cron-emial.cgi and check from a browser to get a cronhhook which I did. After setting the script up by crontab I started to get an error message. I renamed the file cron-email.pl and get a cronhook on that at via a browser. I've changed the commmand line to include the file ending .pl but no joy. I'm exceeding the level of my competency not sure of differences between pl, cgi, php files.