Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

Windows scheduled Task result

the log of the windows scheduled task gives the following:

Result: The task completed with an exit code of (0).

what are the other codes? is there a reference for this?

thanks
0
anushahanna
Asked:
anushahanna
  • 2
3 Solutions
 
oBdACommented:
That's just the errorlevel that whatever program you've scheduled to run returned when it finished.
Since the errorlevel is program dependent, you'll have to check with the manufacturer of the program if the program returns an errorlevel (other than 0), and if so, what it means.
If you schedule the batch script below, for example, the task scheduler will display an exit code of 0x4D2 (=1234 in decimal).
@echo off
exit 1234

Open in new window

0
 
Jason Yousef, MSSr. BI  DeveloperCommented:
YES, there's a reference for all the exit codes , HERE

0
 
oBdACommented:
Nope, that is NOT a reference for "all the exit codes"; these are, as the title says, "Windows System Error Codes" (the same ones that can be obtained localized using "net helpmsg <error code>"). A default OS application like "net.exe" will usually exit with one of these, but the batch script above will certainly not have suffered from "1234 No service is operating at the destination network endpoint on the remote system".
A programmer can decide which errorlevel his application will return under which conditions. robocopy.exe, for example, will return with a bitmask value indicating what happened during the copy and whether there were serious failures.
0
 
anushahannaAuthor Commented:
ok. Thanks for the details and nature of the errors.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now