Man, I just don't know what it is that's so different in 2008 that's giving
me such headaches with scheduled tasks.
Since converting from a Windows 2003 server to 2008 for our file server I've
had numerous problems with scheduled tasks no longer running. I've set them
up as identically as I can tell (given the differences between the two task
scheduler interfaces), running the same script files, and they just don't
want to run on the 2008--but only as a scheduled task. If I run the .cmd
from the command line it works fine.
For example:
I have a basic script (estimating.cmd) that uses the Windows copy command to
copy two Excel documents from a departmental share to our intranet site.
The script is as follows:
Copy "C:\DATA\estimate\Resource Tools\HardBids.xls"
"\\lan-intranet\c$\Inetpub\wwwroot\ProjectPlanningGroup"
Copy "C:\DATA\estimate\Resource Tools\CurrentEstimatLoad.xls"
"\\lan-intranet\c$\Inetpub\wwwroot\ProjectPlanningGroup"
Both the file server (that the script is running on) and the intranet server
are domain members, and the task is running using the domain administrator
account. I've also tried checking the "Run with highest privileges" box.
If I go to the command prompt, navigate to the scripts director and type
"estimate.cmd", the script runs fine, both files are copied successfully.
If I set this up as a scheduled task it fails with result 0x1. I am unable
to determine what this error means for the copy command, and it just boggles
my mind why it would fail in the first place, since running the script
manually works without a problem.
I've tried using the /Y switch in case whatever environment is running the
script just doesn't like the fact that the file already exists at the
destination. I've also tried adding > ppg.log at the end of the first line
and >> ppg.log at the end of the second to record some sort of output, but
no files were created.
I welcome any advice, as I'm at my wit's end here. The other scripts I've
just given up and ran them from the target, copying from the source to
themselves, but I would like to nail down once and for all just what is so
different about the Windows 2008 Task Scheduler that is causing every script
I've ever used to not run without issue. Thanks in advance.
Joe
Bookmarks