From owner-freebsd-questions Thu Nov 9 9:12:26 2000 Delivered-To: freebsd-questions@freebsd.org Received: from boat.mail.pipex.net (our.mail.pipex.net [158.43.128.75]) by hub.freebsd.org (Postfix) with SMTP id 3164A37B479 for ; Thu, 9 Nov 2000 09:12:23 -0800 (PST) Received: (qmail 22195 invoked from network); 9 Nov 2000 17:12:20 -0000 Received: from mailhost.puck.pipex.net (HELO mailhost.uk.internal) (194.130.147.54) by our.mail.pipex.net with SMTP; 9 Nov 2000 17:12:20 -0000 Received: (qmail 319 invoked from network); 9 Nov 2000 17:12:15 -0000 Received: from camgate2.cam.uk.internal (172.31.6.21) by mailhost.uk.internal with SMTP; 9 Nov 2000 17:12:15 -0000 Received: by camgate2.cam.uk.internal with Internet Mail Service (5.5.2650.21) id ; Thu, 9 Nov 2000 17:11:07 -0000 Message-ID: From: Daniel Bye To: 'Peter' Cc: freebsd-questions@freebsd.org Subject: RE: Crontabs Date: Thu, 9 Nov 2000 17:05:26 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hmmm. Not that I'm aware of. I guess you could try to capture the PID of the job that starts, make it log that to a .pid file somewhere, then setup another cron job to kill `cat ping.yahoo.com.cron.pid`? Must be possible. Never needed to do it though. Any other takers? Dan -----Original Message----- From: Peter [mailto:peterk@americanisp.net] Sent: 09 November 2000 16:15 To: Daniel Bye Cc: freebsd-questions@freebsd.org Subject: RE: Crontabs > The easiest thing to do is to use the -c flag to ping. This allows you > to specify how many packets to send, then exits when done: I know I can do that, but I was wondering can I make cron kill a job after XX mins, or does it already do this? What if I have users that run a cron job of ping yahoo.com every single min? We will have solar energy as soon as the utility companies solve one technical problem -- how to run a sunbeam through a meter. --- www.nul.cjb.net --- The Power to Crash! --- www.FreeBSD.org --- The Power to Serve! On Thu, 9 Nov 2000, Daniel Bye wrote: > The easiest thing to do is to use the -c flag to ping. This allows you > to specify how many packets to send, then exits when done: > > [ecam082: danielby: ~]$ ping -c 5 www.uk.freebsd.org > PING web008.pavilion.net (212.74.4.8): 56 data bytes > 64 bytes from 212.74.4.8: icmp_seq=0 ttl=244 time=34.627 ms > 64 bytes from 212.74.4.8: icmp_seq=1 ttl=244 time=20.867 ms > 64 bytes from 212.74.4.8: icmp_seq=2 ttl=244 time=31.106 ms > 64 bytes from 212.74.4.8: icmp_seq=3 ttl=244 time=22.631 ms > 64 bytes from 212.74.4.8: icmp_seq=4 ttl=244 time=28.850 ms > > --- web008.pavilion.net ping statistics --- > 5 packets transmitted, 5 packets received, 0% packet loss > round-trip min/avg/max/stddev = 20.867/27.616/34.627/5.162 ms > > > > You can alter your crontab to log to a file, or better, write a wrapper > script that does all of it - pinging the chosen host the chosen number > of times, and output that to a file. Then you can call the script > from your crontab. > > Dan > > -----Original Message----- > From: Peter [mailto:peterk@americanisp.net] > Sent: 09 November 2000 15:43 > To: freebsd-questions@freebsd.org > Subject: Crontabs > > > I've not been able to find this in the crontab man pages (I skimmed could > have missed it) but let's say I make a cron job of "ping yahoo.com," and > since ping does not quit until you hit ctrl+c, will the cron job continue > to run until I specifically kill it? If so under ps will it show as user > bob pinging yahoo? or where will I find this under ps? Does cron kill > it's jobs after x mins? Can I configure it so it will? (so I don't DoS > myself thru runaways cronjobs). Another question: my sendmail crashes > (signal 11, I need to remake it, I suppose) so cron can't send output to > user, does this file/ouput get stored anywhere else? TY. > > > *** Fortune *** > Albert Einstein, when asked to describe radio, replied: "You see, wire > telegraph is a kind of a very, very long cat. You pull his tail in New > York and his head is meowing in Los Angeles. Do you understand this? > And radio operates exactly the same way: you send signals here, they > receive them there. The only difference is that there is no cat." > > > --- www.nul.cjb.net --- The Power to Crash! > --- www.FreeBSD.org --- The Power to Serve! > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message