I have a script app (exported as ScriptDebugger run-only) that I run each morning at 7:15am via launchd. This works fine if the MacBook is not in sleep mode, i.e. I have woken it and am using it, but if it needs to wake itself it stalls when it needs to make keyboard input. I use a call to ‘caffeinate -u’ at the start of the script to tell the computer that the user is active.
I have tried giving a bunch of system permissions to overcome this but nothing has worked, including:
System Settings → Privacy & Security
→ Full Disk Access
→ Automation
→ Input Monitoring
→ Accessibility
→ /System/Library/CoreServices/System Events.app
Does anyone have any suggestions that I have missed?