Tuesday, February 9, 2010

Scheduled Tasks in a Domain

This was important enough to me to decide to post it. I don't know if the issue is just uncommon, or if most people give up but I get a bit... obsessive sometimes ;-)

Here's the situation:
You have a task, in my case I needed to download files from an FTP server, and you need it to reoccur say on a daily basis. Sure you can do this by hand but that get's tedious, and if you're like me you tend to forget.
Solution, windows scheduled tasks! Seems simple enough, but thankfully(job security I guess) Microsoft has a way of making sure simple things find a way of being more complicated than they are.
So the new problem is in a standalone pc, tasks can be done fairly anonymously. Not in a domain though. Shouldn't be a big deal, just use an administrator account. Well unfortunately that's not enough as you get this wonderful message after trying to create a scheduled task.
The new task could not be created.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
Seems like there is something wrong with the permissions. Well there is, and it's not just security settings. As it turns out it's the ACL's on the Tasks folder. This seems to be a relatively common problem in a domain, but it depends on the kind of work you are doing.

Here's the fix. From a command prompt, Start>Run>cmd, type

C:

CD Windows

CACLS TASKS /E /G builtin\administrators:F

I just wanted to post this in the hopes that someone else dealing with this won't have to go through all the work I did!
Lilypie 3rd Birthday Ticker
Lilypie 4th Birthday Ticker