Task Scheduler on EC2 Windows Server 2008 R2

amazon ec2task-schedulerwindows-server-2008-r2

I have an EBS image that has a task that runs upon startup from the task Scheduler. It runs a Python script that then executes the required tasks using the subprocess module. Now the script kicks off when the machine is booted as expected, but one of the tasks (specifically Matlab 2007a) returns an exit code of -1073741819 which google returns nothing for. Other tasks are also python or 7zip, but they run without problem.

If I run the python script directly, everything runs without fault. This makes me suspect something with the permissions that the task has. "Run whether user is logged on or not" and "Run with highest privilege" are checked.

Has anyone had similar problems?

Best Answer

As you say, "something with the permissions". The "task has" permissions of the user who scheduled the task. You can select a different user or group account for a task to run under (and inherit the permissions of). It's easy. How to do it is at Microsoft's TechNet web-site.