PDA

View Full Version : Shell Script after completion not working


msealey
09-24-2009, 11:38 AM
Hi,

Can anyone think of a reason why a (bash) shell script (to email me notification of the fact) runs (after successful completion) when I 'Copy Now' manually but does not run (even though the log says it does) in all scheduled SuperDuper clones?

Green bars all the way.

I cd to the correct directory and get no errors when cloning manually. No emails when scheduled. It's a short script with permissions set to 555:

#!/bin/bash
cd /Applications/FileMaker\ Pro\ 6\ Folder/SuperDuper
SUBJECT="OTA Backup completed"
EMAIL="person1@email.address,person2@email.address,person 3@email.address"
EMAILMESSAGE="SuperDuperUSB1AM.txt"
mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE


TIA!

dnanian
09-24-2009, 11:45 AM
You're sure this was actually set up before the schedules were created? There's really no difference between a manual and a scheduled run as these things go...

msealey
09-24-2009, 12:32 PM
Dave,

No schedule set up first. Always works.

Then I added the script to the Options in the Copy Script.

Is that sequence important?

dnanian
09-24-2009, 12:38 PM
Well, changes to the main window do not change existing schedules. You'd have to delete and recreate the schedule for it to work... if you didn't do that.

msealey
09-24-2009, 01:56 PM
Thanks, Dave. I deleted and recreated each Scheduled event and the shell scripts ran.

Appreciated :)