Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

Ensure that your python executable has execute permissions for the built in user BATCH (i tend to just go with full control).

Also, create a new local user - Scheduler (for example) - and give that local admin and a very strong password. Then use that as the account to launch the task.

When you run the python manually, do you need to click past the UAC prompt? If you do you will need to make sure that you tick 'Highest Privilage' on the task.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.