launchd and non-root user scheduling
I ran into a problem using launchd to schedule a recurring non-root user script (High Sierra 10.13.6) I want myscript to run, at specific times, whenever my Mac is running. After I ran into this issue, I reread the details of how launchd works, and concluded my workaround may be the only viable solution.
The issue: apparently, scheduled non-root user scripts cannot be run, until after that user logs in to the Mac. I want the script to run regardless of whether I've logged in or not, since last startup.
My workaround: instead of directly scheduling my own script, I schedule a root script, at the desired times, that essentially does this:
su myuserid -c "/path/to/myscript"
I welcome advice on this.
Mac Pro (Mid 2010), macOS High Sierra (10.13.2)