I'm trying to run backups at a set time. These won't run no matter what I do, so I'm hoping for some advice to either A) get this macro to run at a late hour, or B) set it to run around 6 PM but with a prompt to wait for execution if I'm still working on the computer.
Option A: The Energy Save preferences are set to Prevent Computer From Sleeping and to Wake for Network Access. The computer stays on all night.
Even executing the macro from Calendar fails.
The individual macros called in this DO work when manually executed, and this macro works entirely when run while I'm actively using the computer.
Option B: I'd like to popup a prompt that asks if I"m ready to run the backups. If I click a No or Wait button, I want the macro to ask again in 30 minutes. If I click Yes or fail to click anything after 5 minutes, the macro runs the backups.
I haven't been able to figure out how to make such a prompt.
Option C: Got an alternate method of making this damned thing work?
According to your settings, it should, yes. But, since you are saying the macro triggers while the computer is actively used, there is a suspicion that it is not awake; or somehow not as awake as when actively used…
Something wrong with the Energy Saver panel; corrupted preferences plist file?
Any other processes that put the computer to sleep? (For example some of my CarbonCopyCloner schedules are set to put the computer to sleep when finished.)
Have you tried it without the “Put hard disks to sleep” option? With “Turn display off: Never”?
If you have another Mac, does the macro trigger there?
You can check whether the macro triggers at all by looking in the Engine.log file the next morning.
If the Mac is asleep, nothing will happen, no macros will fire.
If the Mac is awake, the macro should fire, however if the screen is asleep, screen saving or screen locked, many facilities will be blocked by the system. Things like Execute Script should be fine, but things that try to do UI will fail.
You might like to do something like this:
Trigger at 6pm
Pause Until IDLE() > 60*5 (less than your display sleep time)
Alert “Run Macro?” Timeout 1 minute without aborting the macro
Of course, if you cancel the macro, then the actions will not run at all.
I’ve gotten half of this to work–reliably for a week now.
Peter mentioned that KM can’t do gui-related actions when the screen is sleeping. Once I disabled any actions that relied on whether Finder had this window name open, the folder sync macros worked. The Chrome and Session Buddy backup macros won’t because they rely on KM “seeing” the screen.
I’m not sure how I’ll get the latter to work, but the daily sync/backups of drives were the most important. Thank you for all the help, everyone.