Hey peter, laptop's great. (for other's info: peter did an install on a P75 with 28MB RAM, no floppy, no bootable cdrom... for me last weekend)
thanks for your help. you're awesome. Here's hoping for no cron mail for me ;) hey, talking about mail... can anyone tell me how to reply to these digest mails (using pine) so that I don't have to cut'n'paste, whereby I miss out on the >'s at the start of each line? Whenever I attempt it, the reply message includes only about 5 lines of the original mail... nowhere near the place where the text is that i'm replying to. make sense? :) thanks safari >On Thu, 2002-08-08 at 18:10, [EMAIL PROTECTED] wrote: > hello, >Hey dude. How's the laptop? :-) > i'm running a script via crontab and want stdout and sterr to be appended > to cronstuff.log just so i can keep an eye on this one script. > > 1) Is it best (or even possible) to add something like: > > 02 17 * * mon,thur,sat root /usr/local/bin/sitestats >> cronstuff.log > 2>&1 > > (and does it matter about spaces/tabs any time after the <command> ?) It certainly is possible, and cron doesn't worry about whitespace in the command. > 2) or should i add it to the script /usr/local/bin/sitestats I think it's cleaner to do it the first way, in case you ever want to run the script outside of cron or have it log elsewhere. > If I do 2), will mail still be sent to root? Mail only gets sent if there's any output from the script. So, unless something goes wrong, it won't send mail. > 3) I've read about MAILTO being included in crontab. Perhaps this is a > better (simpler) way to go? Except I want the mail relating to this job, > being run by root, to be sent to me at my mail addie. If you put MAILDIR="[EMAIL PROTECTED]" in your crontab, then cron will send to that address. But it'll send the output of all the jobs in that crontab file, which may or may not be what you want. If you only want the output from the one job mailed to you, then you might like to try something like: 02 17 * * mon,thur,sat root /usr/local/bin/sitestats 2>&1 | mail -s cronstuff [EMAIL PROTECTED] (all on one line, of course) Hrmn. Hope that helps. -- Pete [EMAIL PROTECTED] -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
