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

I am having a strange problem with the Windows Server 2008 Task Scheduler. I have to run a small command-line application every few minutes. This application just executes a quick web service call on the localhost and adds an entry to a log file; so it should not need anything special in terms of permissions.

First, I created a new user account "my_scheduler" just for the task. This account is a member of the Users group (not sure what other settings I should turn on/off) and set it's password to not expire.

I then create a task to run the application every few minutes. I set it to "Run whether user is logged on or not" and turned on "Do not store password. The task will only have access to local resources" (I did this since it's not hitting anything on the network. I did not turn on "Run with highest privileges" since it does not seem to need them. I set the schedule to "After triggered, repeat every 30 minutes for a duration of 1 day" and "Allow task to be run on demand" (no other settings enabled).

However, I notice that in the Event Log, I see a bunch of these warnings whenever the task is run:

"Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off."

Even though I get the warning, the task is executing (I see the log entries appearing).

Another (possibly related) issue is that I also see that it's starting multiple copies of the task (within a few seconds of each other) even though it should only start one. This is also a big problem.

Any idea how I can fix this?

Thanks in advance,

Dan

share|improve this question
add comment

1 Answer

The error you see in the event logs is most likely a result of the user you created not having a profile set up. Bascially it's complaining that there's no user folder for your service account under %SYSTEM DRIVE%\Users\

As you created the account specifically for this task, you can safely ignore the error, as it probably doesn't need a user profile anyway. You could also log on to the server as that account to create the user profile, or change the account executing your scheduled task to one of the built in service accounts, like LocalService or NetworkService (assuming, of course that this won't break permisions on your task).

I don't think you've provided enough information to discern why your task is running multiple instances, but it's probaly not related to that error you're seeing.

share|improve this answer
    
Thanks for the feedback. It would be strange to require a profile folder for what is essentially a service account. I made a couple of changes to the Task Scheduler task and it seems to have fixed the issues: 1) I unchecked the "Do not stor password" option. 2) I set the task to "Do not start a new instance". These changes seemed to have resolved the issue, at least for now. I will monitor to see if I see the error again. –  Dan C Jun 19 '12 at 19:11
add comment

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.