I have a windows user data script that references a bunch of other ps1 scripts.
In one of the scripts I am trying to schedule a job, that will run on start up. This job has an action of triggering another ps1 script on startup.
However, all my other scripts are executing fine. But the script that creates a new schedule job isn't getting executed.
After restarting the ec2 (post user data execution), I am 1st checking if the job is scheduled. It's not. So, i have to manually trigger the scheduleJob script, then restart. After doing the steps manually, the job is triggering properly and running my PostStartUp script.
As far as I know, user-data scripts are run as admins, so this doesn't seem to be a privileges issue.
Thanks in advance.