2 ical Applescripts

Discussion in 'UI Customization' started by prodviz, Jul 31, 2018.

  1. prodviz macrumors newbie

    Joined:
    Jun 18, 2014
    #1
    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
     
  2. chabig macrumors 603

    Joined:
    Sep 6, 2002
  3. prodviz thread starter macrumors newbie

    Joined:
    Jun 18, 2014
    #3
    Cool, cheers for the link.

    Does Lingon run a script when the machine is asleep?
     
  4. chabig macrumors 603

    Joined:
    Sep 6, 2002
    #4
    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.
     
  5. prodviz thread starter macrumors newbie

    Joined:
    Jun 18, 2014
    #5
    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.
     
  6. chabig macrumors 603

    Joined:
    Sep 6, 2002
    #6
    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?
     
  7. prodviz thread starter macrumors newbie

    Joined:
    Jun 18, 2014
    #7
    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
     
  8. chabig macrumors 603

    Joined:
    Sep 6, 2002
    #8
    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.
     
  9. prodviz thread starter macrumors newbie

    Joined:
    Jun 18, 2014
    #9
    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
     
  10. chabig macrumors 603

    Joined:
    Sep 6, 2002

Share This Page

9 July 31, 2018