From owner-freebsd-questions Thu Nov 9 8:15:33 2000 Delivered-To: freebsd-questions@freebsd.org Received: from copper.americanisp.net (copper.americanisp.net [208.244.174.41]) by hub.freebsd.org (Postfix) with SMTP id 620D337B4C5 for ; Thu, 9 Nov 2000 08:15:30 -0800 (PST) Received: (qmail 32481 invoked from network); 9 Nov 2000 16:15:11 -0000 Received: from unknown (HELO oxygen.americanisp.net) (208.244.174.10) by copper.americanisp.net with SMTP; 9 Nov 2000 16:15:11 -0000 Date: Thu, 9 Nov 2000 09:14:42 -0700 (MST) From: Peter To: Daniel Bye Cc: freebsd-questions@freebsd.org Subject: RE: Crontabs In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 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