DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 18th August 2019
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 22
Default Cron and email

I have the following line in root's crontab:
Code:
00 06 * * *  /root.backup.sh -m
which runs this very basic script:
Code:
#!/bin/sh
mount /dev/sd1a /mnt/
/usr/local/bin/rsync -avh --exclude-from=/home/stan/rsync.exclude /home/stan /mnt/
/usr/local/bin/rsync -avh /etc /mnt/
/usr/local/bin/rsync -avh /var //mnt/
cd /home/stan/
umount /mnt/
sleep 5
shutdown -p now
If I run the script as is, the backup occurs but i get no email confirmation.
If I remove the last 2 lines, the backup occurs and I get email confirmation.

What I'd like to know is why this occurs and how can I run the script as is and receive confirmation?

Any help would be appreciated.
Thanks
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
syspatch cron job azdps OpenBSD General 4 29th June 2018 04:05 PM
cron newsyslog message starbuck FreeBSD General 2 6th August 2008 07:33 PM
Please help me automate getmail with cron cssgalactic FreeBSD General 2 9th July 2008 10:13 PM
Cronjob script does not run in cron godfrank FreeBSD General 9 30th June 2008 12:41 AM
Using sendmail in a cron job erehwon OpenBSD General 6 15th May 2008 09:03 PM


All times are GMT. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick