Ran into a strange problem the other day when i was trying to set up a simple task on a Windows 2008 server.
I created a job in Task Scheduler that copied files from a network share to the local drive, and the job worked fine as long as the user was logged on.
But when trying to activate the Security option “Run whether the user is logged on or not” (see image below)
I got the following error:
This error message was very cryptic until i asked my friend google 🙂
Here is how you find the real answer :
Open the calculator and change to “Programmer” mode (click VIEW, PROGRAMMER).
Click on “Dec” and enter 2147943712.
Clicking on “Hex” will convert it to hexidecimal and resulting with 80070520.
The “8007” part of the code identifies it as a win32 status code, so 0520 must be the error code.
Then make sure that “Hex” is selected and enter the last three numbers, 0520 and click on “Dec” to convert to decimal resulting in 1312.
From the command line run “net helpmsg 1312”.
The net help output was: “A specified logon session does not exist. It may already have been terminated.”
This is because there is a policy setting (in the local policy, that was set by GPO) that don’t allow to store passwords on the computer for network authentication (domain accounts).
Disable this setting and you are allowed to store the password and run the task whether user is logged on or not ! 🙂
I am not sure, but i think the passwords are stored as clear text on the local machine so use service accounts with limited access to network resources for this. Do not set up the task with Admin accounts 🙂