I am trying to setup a PowerShell warm-up script to run within Task Scheduler. The warm up script I am using is found @http://kirkhofer.wordpress.com/2008/10/18/sharepoint-warm-up-script/ The Warmup.bat and Warmup.ps1 scripts run perfectly when executed manually outside Task Scheduler. When I setup the same Warmup.bat file (that links to Warmup.ps1 file) to run within Task Scheduler it runs with the following messages in the History tab:
Event ID Task Category Time and Date
102 Task completed 19/07/2011 12:17:00
102 Action completed 19/07/2011 12:17:00
102 Created Task Process 19/07/2011 12:17:00
102 Action Started 19/07/2011
12:17:00
102 Task Started 19/07/2011
12:17:00
102 Task Engine received message to start task 19/07/2011 12:17:00
102 Task triggered by user 19/07/2011 12:17:00
As shown above in the time and date column the task completes immediately after it was triggered. This is not normal behaviour. It should take two to three minutes to complete. Also I have setup the Warmup.bat file to generate an output file. Running the scripts manually it creates the output file OK, but when the same script is run within Task Scheduler no output file is created. It’s almost like
it is not running the Warmup.bat file. This is strange because I have run setup batch scripts before without any problems.
I am using the SharePoint Farm account to run the batch file from within Task Scheduler, and the batch file is located locally on the server and not remotely.
Has anyone come across this problem before?
I hope you can help.
CEStar.
Hi All,