On Mon, 27 Jan 2020 11:08:19 -0800 (PST) Rich Shepard <rshep...@appl-ecosys.com> dijo:
>Try putting these three lines in your cron script: > >MAILTO=myusern...@gmx.com >TS=`date` >... >echo "$TS - Home Backup Completed" | mail $MAILTO Thanks, I think I'm getting closer now. Previously, while working on getting the rsync command to do what I wanted, I had been just running the command as root in the terminal window. (I use it as root with the -a option to preserve ownerships, lest the backup end up owned by root.) Last night I put it into a root cron job to run at 3:15am, but this morning I had no idea if it had succeeded or not. So I went back to the command line to add the mail option. In all this time I had not bothered with a script because the command was just one line. So just now I made a script so I could have more than one line, and having done so I ran it from the terminal. The script ended with: mail: cannot send message: Process exited with a non-zero status I suspect that this is actually an rsync error, although the rsync command still has -v option so I could watch as it progressed, and I didn't see any error messages. I remember reading in the rsync man page about exit codes, but all I remember is that 0 means 'no errors,' or such. Maybe I need the mail to tell me what happened. And make rsync send the mail even if the exit status is non-zero. _______________________________________________ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug