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

Smorg1966

macrumors newbie
Original poster
Nov 3, 2023
2
0
I am trying to do an Automation, but I cannot get it sorted properly and did not know if it was me or just not possible. I want to write an Automation whereby after 21:00 if I connect my phone to a charger then an app will start. E.G a night clock starts when phone is put on charger after 21:00 but if put on charge during the day nothing will happen. Any help will be much appreciated.
 

iStorm

macrumors 68020
Sep 18, 2012
2,035
2,441
Should be possible.

Example 1: 21:00 to Midnight

1699040524731.png

The "Specified Date" is the Date action. Just type in the time, which ends up being "[Today], 9:00 PM". The above doesn't open the app if you were to plug in after midnight, say at 01:00. The next example solves that problem.

Example 2: 21:00 to 06:00

1699040014983.png

Here we are basically flipping the logic around. If it's between 06:00 and 21:00 (during the day), do nothing; otherwise, open the app. Another note/gotcha is that you need the leading 0 to indicate 24-hour time (06:00 is 6am, 6:00 is 6pm).
 
  • Like
Reactions: Smorg1966

Smorg1966

macrumors newbie
Original poster
Nov 3, 2023
2
0
Should be possible.

Example 1: 21:00 to Midnight


The "Specified Date" is the Date action. Just type in the time, which ends up being "[Today], 9:00 PM". The above doesn't open the app if you were to plug in after midnight, say at 01:00. The next example solves that problem.

Example 2: 21:00 to 06:00


Here we are basically flipping the logic around. If it's between 06:00 and 21:00 (during the day), do nothing; otherwise, open the app. Another note/gotcha is that you need the leading 0 to indicate 24-hour time (06:00 is 6am, 6:00 is 6pm).
Many thanks for that
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.