Quantcast
Channel: Windows Server
Viewing all articles
Browse latest Browse all 26364

Scheduled task doesn't work after reboot, until the user has logged in.

$
0
0

Here is the situation:

We have a terminal server running on Windows Server 2003 R2. This machine needs to reboot nightly for performance reasons. We have a report that needs to be run after reboot. The reason for this is that it takes a lot of time and system resources to run and workers need it the next morning. I have created a scheduled task for this and it works fine as long as the user who's name/password I used is actually logged in. If the user is not logged in then it doesn't perform it's task.

This task accesses data on a couple of servers so I am using a domain admin account to ensure that I have the proper permissions. There are no mapped drive paths that I am aware of. Everything is set up with UNC paths. When checking my event logs I see the following error:

The %APPDATA%\Timberline folder is missing. [Failed to create folder due to insufficient permissions]

My theory at the moment is that the scheduled task isn't opening up the user's profile enough that the user specific folders such as Appdata are accessible. I've tried creating another simple task that does nothing other than create a folder in the user's %appdata% path. It doesn't work either unless the user has already logged on recently. The batch file I used for this second task is simply:

mkdir "%appdata%\test333"

- Run only if logged on is unchecked
- The Task Scheduler service is set to log on as the Local System account and "Allow service to interact with desktop" is checked
- This user has rights to log on as a service and to log on as a batch job

Is there some way to get access to the user's %appdata% folder without them having to log in first? As a workaround, is there any secure way to load up that user's profile immediately after a reboot? I've spent quite a bit of time trying to get this solved so any help will be greatly appreciated.


Viewing all articles
Browse latest Browse all 26364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>