Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Failing Schedule Task

Hi

Can anyone tell me how to find out why a schedule task keeps failing? is an error message generated?

Thanks
0
ac_davis2002
Asked:
ac_davis2002
4 Solutions
 
SjizzelCommented:
if you look at the Scheduled task, there is a column that shows an exit code or result code. You need to find that and see why it fails
0
 
gaurav05Commented:
Hi,

Have you run your schedule task using admin account.. ?


with option (run task whether user logged in or not option )
0
 
XaelianCommented:
Can you give the exitcode? It can also be that it requires admin authentication.

What do you want to do with the task? Is it a script? Maybe you've missed something in it. It doesn't mean that it will run in your tasks if you can execute it. If it's a script I'd like to take a look at it.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ac_davis2002Author Commented:
ok, the task runs daily and most days it works just sometimes if fails..

It runs as admin.

where will i find the exit code?
0
 
XaelianCommented:
When you open your scheduled task. You'll see name, status, ...., result of last run.
We'll need the result of the last run.
0
 
ac_davis2002Author Commented:
ok the last result is 0x0  ?

but the status is running, should i create a new post when it next fails with the last result code?
0
 
ac_davis2002Author Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for ac_davis2002's comment #a38353526
Assisted answer: 125 points for Sjizzel's comment #a38353372
Assisted answer: 125 points for gaurav05's comment #a38353377
Assisted answer: 125 points for Xaelian's comment #a38353445
Assisted answer: 125 points for Xaelian's comment #a38353475

for the following reason:

thank you all!
0
 
ac_davis2002Author Commented:
Excellent
0
 
rickdweaverCommented:
I ran into this issue with a batch file running as a scheduled task. It would run perfectly fine if I executed it manually but when I tried to run it as a schedule task it would fail instantly.  The batch file I was running was a simple Robocopy command.  I had created mapped drive letters to make it simple to write.  Come to find out when executing the command manually it recognized the mapped drive and performed the function flawlessly.  However when executing the command from a scheduled task the task could not recognize the drive mapping and therefore fail.  I used the full UNC name in the command and the task ran correctly. (ie robocopy \\server_name\share_name\path d:\local_path)

I assume that when any executable file is run via a scheduled task it takes on a different personality or is not simply running the executable as you would from a command line.  Bottom line DO NOT run executables that include mapped drive letters...stick with the UNC name and the task will behave properly
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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