Re: Rebooting a Mac with a Mail Rule
Re: Rebooting a Mac with a Mail Rule
- Subject: Re: Rebooting a Mac with a Mail Rule
- From: "Stockly, Ed" <email@hidden>
- Date: Wed, 15 Mar 2017 22:30:24 +0000
- Thread-topic: Rebooting a Mac with a Mail Rule
You might try sending adding a "sleep 10;" to the front of your shell
command and then ignore its output ("> /dev/null" added to the end, IIR).
That would give your script time to quit and mail would know the rule
finished without interruption.
On 3/15/17, 3:21 PM,
"applescript-users-bounces+ed.stockly=email@hidden on
behalf of debt"
<applescript-users-bounces+ed.stockly=email@hidden on
behalf of email@hidden> wrote:
>> On Mar 15, 2017, at 1:09 PM, Tom Robinson <email@hidden>
>>wrote:
>>
>> That’s pretty nasty on your GUI apps, they don’t get a chance to quit
>>properly.
>
> I actually have code in the AppleScript that quits the open apps, so
>that’s not a problem here.
>
>> Does OS X relaunch every app if you reboot from command line? Maybe
>>that was causing the issue — reboot app was being reopened.
>
> I haven’t tried that, but in my situation, I have a few apps in login
>items that start up automatically, since it’s a remote machine. However,
>the reboot app wasn’t one of them. As I posited before, I think the
>problem is actually with (that version of?) Mail and how it handles
>external scripts (apps?) called by a rule. Every time it would reboot,
>it kept trying to download the same message and triggering the
>AppleScript.app each time. Not sure how I can prove that, though.
>
> There was another problem also. In the reboot app, I had another do
>shell script calling a Perl script that would send me an email letting me
>know the status, and that got hung up with an error that it couldn't make
>an SMTP connection. Once I placed the script directly in the Mail rule,
>everything worked properly.
>
>Marc
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>AppleScript-Users mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>imes.com
>Archives: http://lists.apple.com/archives/applescript-users
>
>This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden