我有 Windows Server 2012 R2,并且 Windows 任务计划程序中的一些任务运行良好,但昨天它们开始返回此错误0xE0434352
,如下所示:-
我检查了事件查看器日志并发现了这个错误:-
Faulting application name: RunsHourly.exe, version: 1.0.0.0, time stamp: 0xbc3caebe
Faulting module name: KERNELBASE.dll, version: 6.3.9600.19724, time stamp: 0x5ec50c3e
Exception code: 0xe0434352
Fault offset: 0x000156e8
Faulting process id: 0x9f8
Faulting application start time: 0x01d6a09f2cb0bcb1
Faulting application path: C:\batchfiles\RunHourly\RunsHourly.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 719d6328-0c92-11eb-8136-0050568b4e10
Faulting package full name:
Faulting package-relative application ID:
Log Name: Application
Source: Application Error
Date: 12/10/2020 14:54:28
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: *****.ad-itservices.intra
Description:
Faulting application name: RunsHourly.exe, version: 1.0.0.0, time stamp: 0xbc3caebe
Faulting module name: KERNELBASE.dll, version: 6.3.9600.19724, time stamp: 0x5ec50c3e
Exception code: 0xe0434352
Fault offset: 0x000156e8
Faulting process id: 0x9f8
Faulting application start time: 0x01d6a09f2cb0bcb1
Faulting application path: C:\batchfiles\RunHourly\RunsHourly.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 719d6328-0c92-11eb-8136-0050568b4e10
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2020-10-12T13:54:28.000000000Z" />
<EventRecordID>893887</EventRecordID>
<Channel>Application</Channel>
<Computer>******.ad-itservices.intra</Computer>
<Security />
</System>
<EventData>
<Data>RunsHourly.exe</Data>
<Data>1.0.0.0</Data>
<Data>bc3caebe</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.3.9600.19724</Data>
<Data>5ec50c3e</Data>
<Data>e0434352</Data>
<Data>000156e8</Data>
<Data>9f8</Data>
<Data>01d6a09f2cb0bcb1</Data>
<Data>C:\batchfiles\RunHourly\RunsHourly.exe</Data>
<Data>C:\Windows\SYSTEM32\KERNELBASE.dll</Data>
<Data>719d6328-0c92-11eb-8136-0050568b4e10</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
请问有什么建议吗?
另外,当我手动运行该.exe
文件时,我在 CMD 窗口中收到此异常:-
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl
y 'Microsoft.SharePoint.Client, Version=16.1.0.0, Culture=neutral, PublicKeyToke
n=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest
definition does not match the assembly reference. (Exception from HRESULT: 0x801
31040)
at RunsHourly.Program.Main(String[] args)
尽管我Microsoft.SharePoint.Client
在同一个文件夹内有以下内容:-
答案1
您在程序中使用相对文件夹(读取或写入文件)吗?那么当您设置调度程序作业时,您将看到两个字段“程序/脚本”和“启动于(可选)”。您还需要将程序文件夹路径放在启动于(可选)中。这意味着您的程序将运行该文件夹。如果您不这样做并且您的程序不在带有 exe 的目录中启动,它将找不到位于其中的文件。截屏