[EMAIL PROTECTED] schreef: > hello, > > On Wed, Jun 29, 2005 at 03:42:08PM +0200, Holly Bostick wrote: > >>Hey, list, > > > >>Alternatively, since the output cron jobs are being mailed via a mail -s >>command in the scripts themselves, can I/should I just put a dummy user >>in cron's 'normal' mailto slot, so that the "other" mail essentially >>goes to /dev/null? >> >>It's not a big problem now, but I can see how, as I learn more about >>cron and add more jobs for the daemon to run, it could get to be. >> >>What I'd *really* like is the output from the jobs that I've set to mail >>me output, and a summary of names of any other jobs that ran >>successfully, just so I know that they ran successfully. But I don't >>think cron does that... does it? >> > > the only thing i know is to put all the output of the cronjob you won't > have an email to /dev/null > for example: > 3 4 * * * /usr/bin/ls /tmp > /dev/null > > because auf cron only send's emails when it gets output you will never > get an email anymore.
Oh, thanks, now I've learned something -- cron only emails when it gets output. I suppose that makes perfect sense when you think about it, but being new to this, I didn't really know how to think about it in the first place :-) . > > But as you ask for an notification i don't know just one way. > do the task in an extra script an filter there the output, so that the > cron daemon only gets the output u wan't to have emailed. > that's why programs often have the -q --quiet option which only prints > errors. Thanks again... this gives me an idea. One that I don't know how to implement, of course, but that seems like it ought to be doable with the tools I already know of (but don't know how to use properly). But maybe someone who does can tell me if I'm nuts or not. If I: Changed the individual job that I don't want mailed, but want notification of to send it's output to /dev/null (is it only /dev/null, or will cron still mail me if I output to a text file instead?) *and then to* echo the name of the job to (let's say) done_deals.txt after the job completed, and then Made a new cron job that runs last in that time period which sent me the output of cat done_deals.txt (which would hopefully contain the names of all the jobs that completed, but whose actual output was sent to /dev/null or whatever) would that work? It sounds reasonable, although I don't know how to do it (I am so not a command-line jockey), and it also sounds easily repeatable (for cron jobs of all time periods, or if new jobs are added to any time period), which supports it being doable. Does this sound flakey? Does this sound useful? And if it does sound useful, is there any tool that would allow me to create a more global setup in case I wanted to provide this solution to others (i.e. post it on the forums as some kind of script, or package it in some way for Bugzilla)? Holly > > > >>Thanks for any help, > > hope i could help a little bit > > >>Holly > > > cya > > alex > > >>-- >>[email protected] mailing list -- [email protected] mailing list

