I'm trying to set up a scheduled task on my server 2003 box (that is sitting on the WWW) to read web logs into a database.
When I run the .cmd file that I have set up using runas
, the task succeeds. However, when I try to schedule the task under the user, I get the following error:
"ImportToday.job" (ImportToday.cmd) 9/15/2010 2:37:30 PM ** ERROR ** Unable to start task. The specific error is: 0x80070005: Access is denied. Try using the Task page Browse button to locate the application.
Adding the account logimporter
into the Administrators
group lets the scheduled task succeed, but this is really not a long-term option.
I have tried adding the Log on as a service
right, and the account currently has the Log on as a batch job
right.
What do I need to do?
And..... I found it.
By default,
CMD.EXE
requires special permissions when not logged on to a desktop session.So, by adding
Read
andRead & Execute
permissions for the account has fixed my problem.That is:
fixed it for me.