I’ve tried to get a way to create a Scheduled Task from the command line. They don’t provide the tools (commands to do it) nor do we get any notification that DSM was updated. I would have to track the changes by querying the version file with each PMS start.
The earliest I can detect I could detect such a change (either permission loss or DSM update) is when PMS starts but by then it’s already too late. The needed rule file (which is only installable by root during installation) is gone. PMS is about to launch but the process is already running as unprivileged user plex.