Gossamer Forum
Home : General : Perl Programming :

Telnet Question

Quote Reply
Telnet Question
Hi!

I'm wondering....I need to telnet into a server and give a command something like this crontab cronfile How would I go about doing that? Once I'm logged in I'm not quite sure of the command to use?? Any help would be greatly appreciated!

Thank You
Quote Reply
Re: Telnet Question In reply to
Hi Guys!

Thanks for all the responses....I appreciate it. Anyway maybe to explain a little more of what I am doing. I just set up an auto-responder and there is a file called cronfile (This file is used to set up the automated execution of the program on a daily basis) which contains the following line:
0 0 * * * /path/to/cgi-bin/aacron.cgi The aacron.cgi file is the daily taskmaster for the system. It automatically gets executed once per day and scans through the customer list to determine who gets sent an auto-response that day. So basically from here is where I'm not quite sure what to do. The instructions tell me I need to telnet into your server, go to the directory where I uploaded this file (the cronfile) and run the following command: crontab cronfile This will load the command to Unix to tell it to run "aaauto.cgi" everyday at midnight. So I guess I'm not quite sure what to type in the command line?? I haven't had to use telnet yet up until now......so I'm really an amateur at it! Can someone provide exact details as to what I need to type in? :-) Also is there somewhere that I can go to read up on telnet if I ever need to use it in the future? Thanks again for all the help!
Quote Reply
Re: Telnet Question In reply to
domenic:

crontab -l (shows existing crontabs)
crontab -r (removes existing crontabs)

crontab 15 7 * * * /usr/path/to/cgifile
(executes cron a 7:15am every day)

hope this helps,

noguru
Quote Reply
Re: Telnet Question In reply to
To edit crontab, you use the following command line:

Code:
crontab -e

It is unwise to remove crontab because it will delete all your Cron jobs. It is better to use the edit command.

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Telnet Question In reply to
$ man cron

-- Gordon --

------------------
$blah='82:84:70:77';
print chr($_) foreach (split/:/,$blah);
Quote Reply
Re: Telnet Question In reply to
Domenic,

I just gave a brief response to your inquiry, but Eliot makes a VERY important point.

In addition, many webmasters sometimes "run" a cron on a particular text file that contains syntax for several cron jobs.
Quote Reply
Re: Telnet Question In reply to
1) Create a shell file using a text editor with the following codes:

Code:
# Run Automated Script
/path/to/aaauto.cgi

2) Save this file as auto.sh.

3) FTP auto.sh to your web server.

4) Change the permission of this file to 744 using the following command line in telnet:

Code:
chmod 744 auto.sh

5) Then type in the following command line:

Code:
crontab -e

6) Create a file with a text editor with the following codes:

Code:
# Automated Script
0 1 * * * /path/to/auto.sh


and paste it into your crontab screen in telnet.

(Note: This will execute the script at 1:00 a.m.)

7) Hold your Ctrl and X key. This will save the crontab.

Note: Change all the /path/to/ with the physical path to your files.

Voila....your script will now be automatically executed at 1:00 a.m.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited October 26, 1999).]
Quote Reply
Re: Telnet Question In reply to
Hi Elliot!

Thanks alot for the help! I appreciate you taking the time to answer my question. Anyway, I did what you said.....it looks like it accepted it, I think I'll have to wait and see if it works. Like I said, telnet is something very new to me. Anyway, if I have any problems I'll be sure to post them.

Thank You
Quote Reply
Re: Telnet Question In reply to
BTW: It is not telnet you should worry about...You should learn how to program in UNIX. That is the language that is used in shell accounts.

Pick up a book on UNIX or take some UNIX tutorials on the Net.

BTW: The only factor that would cause your crontab not to run is that you forgot to change the permissions of the shell file.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------