Imported from the Apple Support Forums via the Wayback Machine 🔗
Is it possible to start an AppleScript, which checks email (through Mail.app) and continues to keep checking it even while the computer is in sleep?
The reason I'm asking is because I've made an Automator workflow that works in conjunction with Mail.app's Rules that will take a picture from my iSight, attach it to an email, and send it to me when I email myself a special code. (go here http://www.tuaw.com/2008/04/22/mac-automation-create-a-mail-triggered-spy-cam/ if you don't know what i'm talking about). I just don't like leaving my Mac on all the time. I like to let it sleep.
Anyway, is this possible? If so, help me out.
I assume that it would require waking up the Mac after a specified amount of time, opening Mail and if my message with the code is there, then perform the automator actions.
Imported from the Apple Support Forums via the Wayback Machine 🔗
No. When the system is asleep, no processes are active (other than the things that can wake the system). This means that your AppleScript can't run while the system is asleep.
It wouldn't actually help in your case, anyway, since the trigger is Mail.app receiving an email message and Mail is asleep, therefore not collecting mail and therefore not triggering your AppleScript.
0
matthew5384·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Is there any other way to do this then?
0
Camelot·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Sure - don't put your system to sleep. 🙂
You can dim the monitor, which will save power, and depending on your Mac model you may also be able to reduce the processor speed, which will also save power, but if the machine is asleep completely then neither Mail nor your AppleScript is going to run.
0
matthew5384·
Imported from the Apple Support Forums via the Wayback Machine 🔗
in that case...
I don't like to use Mail, because I hate the idea of downloading the mail onto your computer and then having two copies, one on your computer and one on the email server.
Would it be possible to have an AppleScript that checks my gmail inbox at a specified interval for messages that have my special code (just like the rules in Mail) and then executes the automator action to send the message? I also don't like to send the messages through Mail (again, because I then have one copy on my computer and one on the email server), so would it be possible to send it through a terminal command or something?