Win2k Server Scheduled Task issue.

Thor86

Diamond Member
May 3, 2001
7,888
7
81
Getting a "Result: The task completed with an exit code of (1)." in the scheduled task log. Want it to say "Result: The task completed with an exit code of (0)."

I tried re-creating the task and checking the permissions but still no go.

Anyone?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
If you getting a result code, the program was launched. You need to figure out what a return code of 1 means and why the apps is doing that. (Sounds like task scheduler is working fine)

Best,
Bill
 

Thor86

Diamond Member
May 3, 2001
7,888
7
81
Yes, other scheduled tasks run fine, but this one .bat file which is scheduled to run, runs, but gives me the result code of 1 instead of 0. It just contains a net stop and net start function. I don't understand why this works on another identically setup server, but not this. Information regarding for the result codes are pretty non-informative on the MS KB.

Anyone else?
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
In scheduled tasks, go to the advanced menu and click view log. This should tell you what is causing the task to fail.
 

Thor86

Diamond Member
May 3, 2001
7,888
7
81
Yes, in my first post is what I get from the TS logs. I need some insight as to what the code (1) results mean and what I can do to remedy it. Thanks.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Thor86. I'm not sure you caught me earlier reply. The fact that you have an exit code indicates that the task was launched. It appears that task scheduler is working exactly as it should. The real question is whay the program launched returned an result code of 1 (which presumably indicates an error in this case). However, you didn't give much information on what the task is (other than .bat file) so it makes it hard to determine why IT is failing.

Bill
 

Thor86

Diamond Member
May 3, 2001
7,888
7
81
Bill,

All it is, is a simple net stop, net start .bat file that stops and start a cold fusion service on the webserver. The service runs under the system service account. Nothing complicated. Thanks.
 

mcveigh

Diamond Member
Dec 20, 2000
6,457
6
81
it does work when you run it manually correct (just trying to cover all bases )

what is the services status after it runs? ie when you check it the next day, is it stopped? never stoped running ? what?
 

Thor86

Diamond Member
May 3, 2001
7,888
7
81
Mcveigh,

Yes, running it manually does work as it sits on the desktop, and yes the CF services/system account are checked to interact with the desktop, etc. The task scheduler says it ran no problems, except the logs tell otherwise with the error code referenced in my first post. And double checking the task manager, I know, the batch file didn't run, as the memory used for CF is still higher than what it would be after it restarts. Thanks.

Bump.

 

Thor86

Diamond Member
May 3, 2001
7,888
7
81
Ahhh, someone help me debug this process error. Anyone with Win2k DDK, SDK gurus in these forums?

Here are the only information I can find on the web for this particular problem:

MSKB

NT Tips

Bump.