|
#1
|
|||
|
|||
Script Hooks & Log Files
Hello,
I would like to create a shell script which would get called after the copy process is finished which would send an email to myself. I've read through the forums and the proposed solution of using Growl is not sufficient since the MailMe Growl plugin will not work with my mail configuration, etc. I have written a script which can send mail, so that's no biggie, but there are some outstanding issues/questions I could use help on: • Does the "Run shell script after copy completes" option get called even if there is a failure prior? I don't think it does, so this prevents me from being able to send a failure message. • How can my script access the log of the copy operation so I can email it to myself? • Is there a better "hook" than the "Run shell script after copy completes" option which I can use to fire off emails when the copy completes totally (and in the case of a failure /or/ success)? • Does anyone know of a Growl plugin which can execute a shell/Applescript? If there was one, then I could use that to do what I want when SD! sends Growl the notification (I'm assuming SD! sends a notification to Growl on success or failure). Thanks for your time, Levi |
#2
|
||||
|
||||
Instead, Levi, just use the MailMe "Growl" action. It'll send mail on success...
__________________
--Dave Nanian |
#3
|
|||
|
|||
Hi Dave,
Thanks for the reply, but did you read my post? The Growl MailMe plugin is not sufficient (it lacks some basic configurability). Thanks, Levi |
#4
|
||||
|
||||
Clearly not carefully enough, Levi. If you search around on the forums, I think someone posted a sample script years ago that you can use as a basic starting point. That said, if you do use MailMe you can just look at the log if there's a problem -- after all, you're going to have to access to the system to fix it anyway, right?
__________________
--Dave Nanian |
#5
|
|||
|
|||
Hello again Dan,
Can you please answer the bullet points for me? • Does the "Run shell script after copy completes" option get called even if there is a failure prior? I don't think it does, so this prevents me from being able to send a failure message. • How can my script access the log of the copy operation so I can email it to myself? • Is there a better "hook" than the "Run shell script after copy completes" option which I can use to fire off emails when the copy completes totally (and in the case of a failure /or/ success)? Thanks, Levi |
#6
|
||||
|
||||
It's Dave, Levi, not Dan.
Run after copy completes does not run if there's a failure, because the copy didn't complete. A better way to do this is to modify the applescript "schedule driver" -- in there you'll find locations to run commands after a successful or failed copy. Accessing the log would be based on the location of the script, and you'll find a general way to do this in the applescript. And as I said, you can find another example of this elsewhere in the forums by searching around a bit.
__________________
--Dave Nanian |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Booting from backup | guruuno | General | 27 | 10-16-2009 11:53 PM |
Suggestion: include script re. GarageBand (big files) | mypointofview | General | 1 | 02-26-2007 09:10 AM |
'Operation Not Permitted' & Standard Script Files... | killinghall | General | 5 | 02-12-2006 09:07 AM |
Error: No space left on device | tradervic | General | 11 | 06-29-2005 04:50 PM |
Script to only back up operating system files | wiselou | General | 5 | 05-01-2005 11:38 PM |