From owner-freebsd-questions Thu Nov 9 7:57: 4 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 01F9537B479 for ; Thu, 9 Nov 2000 07:56:57 -0800 (PST) Received: (qmail 5830 invoked from network); 9 Nov 2000 15:56:55 -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 15:56:55 -0000 Received: (qmail 2287 invoked from network); 9 Nov 2000 15:56:55 -0000 Received: from camgate2.cam.uk.internal (172.31.6.21) by mailhost.uk.internal with SMTP; 9 Nov 2000 15:56:55 -0000 Received: by camgate2.cam.uk.internal with Internet Mail Service (5.5.2650.21) id ; Thu, 9 Nov 2000 15:55:47 -0000 Message-ID: From: Daniel Bye To: 'Peter' , freebsd-questions@freebsd.org Subject: RE: Crontabs Date: Thu, 9 Nov 2000 15:50:10 -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 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