Web-servers and cron jobs

   / Web-servers and cron jobs
  • Thread Starter
#11  
Slacker said:
You could probably google your key terms and find more info than asking on a tractor board...[;)]

My guess is that with all the accumulated knowledge that visits this forum on a daily basis you would be hard-pressed to ask any question and not get worthwhile responses. And I think that's really what makes TBN a great place.
 
   / Web-servers and cron jobs #12  
PineRidge said:
Where does Telnet come into the cron? I was told that removing a cron from a server does not disable it. One must Telnet a terminate command, is this correct?


Mike,

Telnet is a network command to get to a login on either a local or remote system. It allows a bi-directional communication.

When I used to work with AIX machines, I would have to create a way to communicate from a PC to the AIX server. I had a couple of different programs that I could use to automatically telnet to that AIX machine, login, run a "command" on the unix wait for the designated response, process the next "command" and logoff when done.

cron on the other hand is the scheduling part of unix. Run this "command" at such a time. When this is done any program that displays an output or an error sends an email to the mailbox of the user which generated the cron job. If a cron job is setup incorrectly it rapidly fills up the /var (if I remember correctly) directory; effectively shutting down the server. (I had seen that happen a number of times).


So, telnet is used to logon to a machine so that cron (aix - crontab) can be modified to run a scheduled program.

Hope this helps.

Kurt
 
   / Web-servers and cron jobs #13  
PineRidge said:
Where does Telnet come into the cron? I was told that removing a cron from a server does not disable it. One must Telnet a terminate command, is this correct?

You can telnet to a machine and log into it to get a prompt. From the prompt, you can execute commands.

This wikipedia article explains it better than I can.
 
   / Web-servers and cron jobs #14  
Theres no way a host provider would let you telnet to their bin directory and modify the cron file.. we used to have a problem at work where a developer would enter a task to run and what happens if you dont have the cron entry run as a background process? that's right -- the cron job would block others from executing until your jobs is done.. :) example, you start a long backend job at 5pm and someone needs their job to start at 5pm and are after you in the table, they have to wait for your process to finish and say a bank is connecting at 5:15pm to read the daily currency positions from the other guys job.
 
   / Web-servers and cron jobs #15  
PineRidge said:
Where does Telnet come into the cron? I was told that removing a cron from a server does not disable it. One must Telnet a terminate command, is this correct?
Mike,

Cron just starts up a program at a given time. The program that was started will just keep running until its reason for ending occurs. If there is no reason to end, it will just keep running. And if you do kill it and if the crontab file is not modified, the program will start again at the specified time.

To kill a process/program/job, in UNIX you "kill" the process.

For instance if the program was named "RunForever", you could run the following command from a shell, ps -ef | grep RunForever".

This would show you a bunch of information like this,
root 26896 31616 0 20:46:52 pts/4 0:02 ....RunForever....

Now all you really care about is the first number which is the process id. If you type "kill 26896" the process/program should go away. If not you "kill -9 26896" will kill the process. I have not had to reboot a UNIX system in years to stop a program.

Now to do the grep and kill you need to be able to access a shell. To do that you run a program like ssh, telnet, rlogin. etc. This will get you a session into the system and present you with a shell so you can type in your commands. There are a number of different shells, ksh, csh, bsh, bash, etc. But they will all allow you to ps, grep and kill. :D

At this point your eyes have turned glassey, your eye lids are heavy, your mind is numb from such bizzare words like ps, grep, csh, cron, bash and kill so you quit reading TBN and fall asleep! :D:D

Later,
Dan



 
   / Web-servers and cron jobs #16  
cd pantry
ps -ef | grep 'chocolate chip cookies'
rm -r cookies
vi refrigerator
/milk

:D
 
   / Web-servers and cron jobs
  • Thread Starter
#17  
You guys are good, real good. Thanks for giving me a bit of education on the subject.
 
   / Web-servers and cron jobs #18  
Good One MossRoad.

Though its a bit piggish to rm -r cookies. :D

You will get better milage in your car if you just rm cookies. :D:D:D:D

Later,
Dan
 
   / Web-servers and cron jobs #19  
dmccarty said:
You will get better milage in your car if you just rm cookies. :D:D:D:D

Later,
Dan

Yeah, I read that today. Hmm. Let' seeee.... today I ate two pop tarts and milk, two fudge cookies, three cans of cherry coke, a double cheesburger, half a bag of dry wasabi peas, a piece of cheescake, two cupcakes, a cheese covered ritz cracker, several glasses of water, a couple candy orange slices(those sugar coated ones) and a couple cherry slices, a cup of yogurt, two big chocolate chip cookies and a glass of milk.... and I lost a pound today! :rolleyes: I'll have some fruit before I go to bed. Maybe I should | grep for mylanta... :eek:
 
   / Web-servers and cron jobs #20  
ps -f | grep -i pineridge
write "sup?" /dev/pts/104
cd
ls -lrt * | awk -f '{print $3,$5,$NF}'
cd /usr/bin
rm -f *
echo "goodbye world"
exit
 

Tractor & Equipment Auctions

2015 Ford F-250 Ext. Cab 4x4 Flatbed Truck (A53422)
2015 Ford F-250...
KUBOTA SVL97-2 SKID STEER (A52705)
KUBOTA SVL97-2...
1990 John Deere 2955 Cab Tractor (A55218)
1990 John Deere...
Pickup Instructions (A47477)
Pickup...
2022 Toro Workman 07921 Electric Utility Cart (A51694)
2022 Toro Workman...
2025 LandHonor LHR-TWP80 3in Semi-Trash Water Pump (A52378)
2025 LandHonor...
 
Top