You didn't say how your were triggering the macros -- if it was by plugging in your display, note that in this version that's the trigger for both the "Load..." macros. But you've changed things since then, so this is more a reminder to include all relevant information.
Read the notification carefully and you'll have a clue -- the Action *could not find target application", that is it couldn't work out where to find the System Settings app. I usually see this after a machine lock-up and reboot when previously-open apps are auto-relaunched -- you can sometimes clear this by Quitting and re-opening the app normally, but sometimes you have to Quit everything, restart your machine, and start again.
Again, you haven't said how you are triggering these. But we can get one problem out of the way -- the triggers.
Assume that sunrise is 6:30am and your Mac wakes up at 4:55am.
At 5am, "Set Sunrise..." will be triggered, an instance of the macro will start to execute, will calculate the seconds until sunrise and pause.
At 6am, "Set Sunrise..." will be triggers, another instance of the macro will start to execute, will calculate the seconds until sunrise and pause. This new TimeToSunriseSeconds value will not be used by the first instance, even though this is a Global variable, because the first instance's "Pause" duration has already been set.
At 6:30am, both instances' "Pause"s will expire and "LoadSunrise..." will be executed twice -- the exact sequence of operations will vary, but a) you don't want it to run twice, and b) it may be that one executing instance has Quit System Settings before the other gets to its "Bring front window of System Settings to the Front" Action -- that would give the error you show above.
The solution is simple -- start both macros with a "Semaphore Lock", each with their own lock name, set up as described in the "Preventing Multiple Executions..." section.
Another possible problem is whatever macros you are calling from the "Load" era -- both have two calls to these unknown macros:
...but they're not being uploaded so we don't know what they do.




