No output from periodic
I have a periodic that runs every 15 minutes. I have 5 scripts in the directory that it processes. Most of the time, the 5 scripts don't have to do anything, and thus don't have any output. When that happens, periodic outputs 'No output from the 5 files processed'. Is there a way to make periodic not output anything so that I don't get an email from cron every 15 minutes? TIA Elliot ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: No output from periodic
In the last episode (Jul 08), Elliot Finley said: I have a periodic that runs every 15 minutes. I have 5 scripts in the directory that it processes. Most of the time, the 5 scripts don't have to do anything, and thus don't have any output. When that happens, periodic outputs 'No output from the 5 files processed'. Is there a way to make periodic not output anything so that I don't get an email from cron every 15 minutes? Commenting out that line in /usr/sbin/periodic seems to be the way to go. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: No output from periodic
Yeah, I tried that... Now I just get a blank email from cron. :) Anyone know how to make cron not send an email when there's no output? Elliot - Original Message - From: Dan Nelson [EMAIL PROTECTED] To: Elliot Finley [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:31 AM Subject: Re: No output from periodic In the last episode (Jul 08), Elliot Finley said: I have a periodic that runs every 15 minutes. I have 5 scripts in the directory that it processes. Most of the time, the 5 scripts don't have to do anything, and thus don't have any output. When that happens, periodic outputs 'No output from the 5 files processed'. Is there a way to make periodic not output anything so that I don't get an email from cron every 15 minutes? Commenting out that line in /usr/sbin/periodic seems to be the way to go. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: No output from periodic
What you are seeing is an error condition... You should be able to put a redirect into crontab... Here's an example of one of my entries... It runs every 5 minutes, the dyndnss.pl script and sends output to /tmp/dyndnss.out AND any error messages (that's the 2) to /tmp/dyndnss.err This works for me and I don't see any error messages. In the actual script, if something goes wrong, I have it email me. So I still get notified if the script fails, but I don't get any warnings from CRON. Hope that works. Peter */5 * * * * /cgi/dyndnss.pl /tmp/dyndnss.out 2/tmp/dyndnss.err At 09:41 AM 7/8/2003 -0600, you wrote: Yeah, I tried that... Now I just get a blank email from cron. :) Anyone know how to make cron not send an email when there's no output? Elliot - Original Message - From: Dan Nelson [EMAIL PROTECTED] To: Elliot Finley [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:31 AM Subject: Re: No output from periodic In the last episode (Jul 08), Elliot Finley said: I have a periodic that runs every 15 minutes. I have 5 scripts in the directory that it processes. Most of the time, the 5 scripts don't have to do anything, and thus don't have any output. When that happens, periodic outputs 'No output from the 5 files processed'. Is there a way to make periodic not output anything so that I don't get an email from cron every 15 minutes? Commenting out that line in /usr/sbin/periodic seems to be the way to go. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Anything below this line, is considered a signature line. If you do not know what a signature is within an email STOP here and do not read any further. Thank you. _ Peter Elsner [EMAIL PROTECTED] Vice President Of Customer Service (And System Administrator) 1835 S. Carrier Parkway Grand Prairie, Texas 75051 (972) 263-2080 - Voice (972) 263-2082 - Fax (972) 489-4838 - Cell Phone (425) 988-8061 - eFax I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say Daddy, where were you when they took freedom of the press away from the Internet? -- Mike Godwin Unix IS user friendly... It's just selective about who its friends are. System Administration - It's a dirty job, but somebody said I had to do it. If you receive something that says 'Send this to everyone you know, pretend you don't know me. Standard $500/message proofreading fee applies for UCE. (NOTE: UCE is Unsolicited Commercial Email also known as SPAM or junk mail). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: No output from periodic
I really appreciate all the comments, but this isn't quite what I'm after. I _want_ cron to email me when there _is_ output. But I _don't want_ an email when there _isn't_ output. Anyone know how to accomplish this? Elliot - Original Message - From: Peter Elsner [EMAIL PROTECTED] To: Elliot Finley [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:57 AM Subject: Re: No output from periodic What you are seeing is an error condition... You should be able to put a redirect into crontab... Here's an example of one of my entries... It runs every 5 minutes, the dyndnss.pl script and sends output to /tmp/dyndnss.out AND any error messages (that's the 2) to /tmp/dyndnss.err This works for me and I don't see any error messages. In the actual script, if something goes wrong, I have it email me. So I still get notified if the script fails, but I don't get any warnings from CRON. Hope that works. Peter */5 * * * * /cgi/dyndnss.pl /tmp/dyndnss.out 2/tmp/dyndnss.err At 09:41 AM 7/8/2003 -0600, you wrote: Yeah, I tried that... Now I just get a blank email from cron. :) Anyone know how to make cron not send an email when there's no output? Elliot - Original Message - From: Dan Nelson [EMAIL PROTECTED] To: Elliot Finley [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:31 AM Subject: Re: No output from periodic In the last episode (Jul 08), Elliot Finley said: I have a periodic that runs every 15 minutes. I have 5 scripts in the directory that it processes. Most of the time, the 5 scripts don't have to do anything, and thus don't have any output. When that happens, periodic outputs 'No output from the 5 files processed'. Is there a way to make periodic not output anything so that I don't get an email from cron every 15 minutes? Commenting out that line in /usr/sbin/periodic seems to be the way to go. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Anything below this line, is considered a signature line. If you do not know what a signature is within an email STOP here and do not read any further. Thank you. _ Peter Elsner [EMAIL PROTECTED] Vice President Of Customer Service (And System Administrator) 1835 S. Carrier Parkway Grand Prairie, Texas 75051 (972) 263-2080 - Voice (972) 263-2082 - Fax (972) 489-4838 - Cell Phone (425) 988-8061 - eFax I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say Daddy, where were you when they took freedom of the press away from the Internet? -- Mike Godwin Unix IS user friendly... It's just selective about who its friends are. System Administration - It's a dirty job, but somebody said I had to do it. If you receive something that says 'Send this to everyone you know, pretend you don't know me. Standard $500/message proofreading fee applies for UCE. (NOTE: UCE is Unsolicited Commercial Email also known as SPAM or junk mail). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: No output from periodic
On Tue, Jul 08, 2003 at 10:09:24AM -0600, Elliot Finley wrote: I really appreciate all the comments, but this isn't quite what I'm after. I _want_ cron to email me when there _is_ output. But I _don't want_ an email when there _isn't_ output. But it _is_ output - look for processed in /usr/sbin/periodic. If none of the scripts it spawns say anything, this is what you get back. If you _really_ want to suppress this message, you will either need to edit /usr/sbin/periodic so it doesn't say anything if none of its scripts say anything, or set up a procmail (or similar) rule to filter out the noise. Dan -- Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ pgp0.pgp Description: PGP signature
Re: No output from periodic
in message [EMAIL PROTECTED], wrote Elliot Finley thusly... I _want_ cron to email me when there _is_ output. But I _don't want_ an email when there _isn't_ output. Anyone know how to accomplish this? In three (easy) steps... - Create a wrapper to be invoked by cron - In wrapper... - Execute the real command save the output in a temporary file - Send e-mail only if file size is zero - Parv -- A programmer, budding Unix system administrator, and amateur photographer ISO employment... http://www103.pair.com/parv/work/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]