I have tested the script running as the admin account and with the user account with the scheduled task. In each case it runs fine from the script and runs in about 20 minutes but runs slowly as a scheduled task. To rule out a timing issue or other possible conflict, I did a "run task" from the job scheduler this morning. It still ran like a dog. I stop the scheduled task, ran it from a command line on the server and it worked OK. I will check it out with Sysinternal Process monitor and watch the results
________________________________ From: Joe Tinney [mailto:[email protected]] Sent: June-24-09 12:16 PM To: NT System Admin Issues Subject: RE: Scheduled task Windows 2003 R2 Out of curiosity, are you testing on the command line with the same user credentials that the scheduled task is running under? Barring something like that being the problem it sounds like the batch file is waiting for user input, perhaps? Have you tried monitoring the process with Systinerals ProcMon to see if it is looping endlessly somewhere or getting Access Denied on anything? From: Scott Schneider [mailto:[email protected]] Sent: Wednesday, June 24, 2009 12:02 PM To: NT System Admin Issues Subject: Scheduled task Windows 2003 R2 I have some nightly scripts (5 in total) which copy files from a server out to shopfloor PC.'s 2 out of 5 scripts finish in an extended period of time. The other 3 run for hours and hours and never finish before 24 hours is over. If I manually run the .bat files from a command prompt at the server, they finish in about 20 minutes. I assume if they run fine at a command prompt that it is not a networking issue. I have even tried manually running from the scheduled tasks and get the same slow result. I kill the task, and run it from a command prompt all is fine. Any ideas? Thanks The server is 2003 R2 and the shop floor PCs XP with SP2 This is an example of the one line of the copy command from the .bat file. It repeats anywhere from a few hundred times to a around a 1000 times IF EXIST d:\ptc\vaults\INS_V02\195418.anc copy d:\ptc\vaults\INS_V02\195418.anc \\fab-1140\c$\ncload\26402-58-r.anc <file:///\\fab-1140\c$\ncload\26402-58-r.anc> Scott Schneider Senior Network Admin P Please consider the environment before printing this e-mail ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
