I have a problem with serveral scheduled tasks on Windows server 2016. On the running server, we have serveral scheduled tasks running. Some of them sporadically throws a System.IO.IOException. The error appears in the eventviewer as a .NET Runtime error and a Application error.
.NET Runtime error:
Application: NameOfScheduledtask.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.IOException at System.IO.FileStream.VerifyOSHandlePosition() at System.IO.FileStream.WriteCore(Byte, Int32, Int32) at System.IO.FileStream.FlushWrite(Boolean) at System.IO.FileStream.Dispose(Boolean) at System.IO.FileStream.Finalize()
Faulting application name: NameOfScheduledtask.exe, version: 18.104.22.168, time stamp: 0x5c767522 Faulting module name: KERNELBASE.dll, version: 10.0.14393.2636, time stamp: 0x5bda8043 Exception code: 0xe0434352 Fault offset: 0x000db0b2 Faulting process id: 0x2704 Faulting application start time: 0x01d4dd74d7c09aee Faulting application path: PathToScheduledTask Faulting module path: C:\Windows\System32\KERNELBASE.dll Report Id: 00f31a09-bbad-4ec9-bbf2-f779b5800320 Faulting package full name: Faulting package-relative application ID:
We have a base class for handling logging, and this error appears before entering the first log statement in the code. So it looks to me like our code never runs.
The settings of the tasks:
I look for guidance to why this happens, and what I can do to fix the issue.
User contributions licensed under CC BY-SA 3.0