Share via

Task Scheduler on Windows Server 2019 - task returns 0xC0000142

Evžen Černý Anawe 26 Reputation points
2022-09-14T12:42:23.317+00:00

A week after restart scheduler stops running tasks with 0xC0000142.

Nothing from here works
https://social.technet.microsoft.com/forums/en-US/4bbebc0c-b4cb-47ed-920a-2b2b237e1bbc/task-scheduler-task-returns-0xc0000142

Non-interactive heap is gradualy set to 20480 - nothing changed allways 0xC0000142 after a week.

Monitoring of desktop heap size is impossible on 2019
https://github.com/microsoftfeedback/WinDbg-Feedback/issues/57

Scheduler can't be restarted. Running cmd with system rights. PSEXEC is impossible to run on production server.

Only restart once a week helps.
Microsoft really?

Windows for business | Windows Server | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Limitless Technology 40,106 Reputation points
    2022-09-15T08:01:52.6+00:00

    Hello there,

    Can you run the program directly and it works? If it works then it isn't an issue with dependencies.

    Windows Task Scheduler fails to run in batch mode when the machine has run out of non-interactive desktop heap space. Rebooting the server may rectify the temporary problem until the desktop heap is again exhausted. Adjusting the size of the non-interactive desktop heap has been known to resolve this error permanently.

    If this problem is more urgent for you I would recommend that you can open a case to Microsoft for further professional help.
    https://support.microsoft.com/en-us/help/4341255/support-for-busines

    ---------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    Was this answer helpful?

    0 comments No comments

Your answer

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