Windows Server 2016 Scheduled Task Error

Diaz, John, A 1 Reputation point
2021-05-12T19:22:20.06+00:00

Windows Server 2016 scheduled task ends with return code 2147942499. Runs to good EOJ if task is manually run.

Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2021-05-12T20:40:01.703+00:00

    Runs to good EOJ if task is manually run.

    Does that mean that if you right click the task in the Task Scheduler mmc app and select "run", that it executes ok?

    Or does that mean that you have defined a task to execute some program or .bat file and when you run it interactively, like from a command prompt, that it executes ok?

    If it's the latter, then you need to do basic troubleshooting. What program are you running? What account is the task defined to execute as? Are you capturing stdout and stderr? Does the application itself provide any logging features?


  2. Amit Singh 5,306 Reputation points
    2021-05-16T10:55:39.683+00:00

    Might want to add a /f to the command line to force the reboot. I don't know if this is the cause of that error, but I've seen where if a user is logged in, the scheduled task wouldn't run. The /f switch forced the reboot regardless.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.