Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

prodviz

macrumors newbie
Original poster
Jun 18, 2014
6
0
Hi all

I have 2 ical Applescripts that run at 6am and 1pm.
The Applescripts only run when the machine is awake.

The machine is off for most of the day, so I need to wake the mac at 2 different times of the day.

I have set the initial 'wake' using the Schedule part of the Energy Saver in the System Prefs (which runs the first script without a hitch), but is there a way to wake up the mac a second time, say at 1pm, so the second script will run?

Cheers
 
Cool, cheers for the link.

Does Lingon run a script when the machine is asleep?
 
First, Lingon is just friendly user interface for the macOS feature launchd. There is more information about it on the developer's website: https://www.peterborgapps.com/lingon/ It won't launch scripts if the machine is asleep but it can run missed scripts when the machine wakes up.

The app store version, Lingon 3 is kind of old, and has limited capability to comply with App Store requirements. The full featured version, Lingon X, is only available from the developer, and can do more.
 
Ah I see, cool.

The first AppleScript runs, as I've set the mac to wake using the System prefs, but I need a way to wake the mac a second time in order for the second AppleScript to kick in.

In a nutshell, I am reserving a train seat, one in the morning and one in the afternoon.
The first script tells Messages to send a text to a certain number, as does the second.
My laptop is asleep, so I want a way to either run the scripts while the mac is off, or wake the mac twice in one day, so the scripts will kick in.

Thanks again.
 
I see. So you need the machine on for the second reservation. Why not just leave the machine awake, or make the two reservations at the same time?
 
Good idea. I hadn’t thought of that - running both scripts in the morning.

I know the seat reservation service is advertised as a 10 min beforehand booking (although the script for the 7am seat runs fine and books the seat ok, at 6am), but I’ll test to see if I can book the afternoon seat straight after the first script.

Incidentally, how long can you keep a mac awake for?

Cheers again

Steve
 
I run a Mac Mini server 24/7. If the second reservation cannot be made earlier, keeping it awake might be the only way to manage it. I don't think you can set the machine to wake up multiple times per day but I am not sure about that.
 
Hi there,

just an update, I tested reserving the morning and afternoon seat, by running both scripts first thing this morning and both reservations went through :)
This means waking the mac once is all I need.

Thanks again

Steve
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.