On Tue, 2008-10-14 at 14:18 +0100, Dave Ewart wrote: > On Tuesday, 14.10.2008 at 13:22 +0100, michael wrote: > > > If I wish to have, say, a backup script running daily by the system (ie > > with su privileges) and to have access to any std out/err output what's > > the recommended Debian way to do so? > > > > I've tried > > a) create $HOME/bin/backup.sh script > > b) sudo ln -is $HOME/bin/backup.sh /etc/cron.daily > > > > and it appears to run each day. However, I can't find where std out/err > > is going to - there's nothing in /var/log/syslog for example. > > > > Note I don't want to receive mail for all cron jobs run by the system so > > I presume setting MAILTO in /etc/crontab is not the way forward. > > I think the standard output for jobs run out of cron.daily will > typically go to root's mailbox.
Well, root seems not to have any mail: [EMAIL PROTECTED]:~$ sudo su - Password: ratty:~# whoami root ratty:~# echo $MAIL ratty:~# ls /var/mail mail michael ratty:~# > I suggest writing/rewriting backup.sh so that it writes its output to > well-defined files, rather than relying on the behaviour of standard > output/error. I thought about this but presumed if there was an already set-up mechanism for cron jobs that would be preferable. Otherwise I'd also have to sort out how to manage my own logs for backup.sh output (not sure would want them rotated in case I'm away for over a week, say) ta, M -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]