任务调度程序+间歇性失败+如何调试或获取转储+ windows7

时间:2022-12-22 02:29:44

I have 5 scheduled tasks that are scheduled to run every day at 9.30am. The schedule is basically a vbs script that opens an excel workbook and runs a macro. These 5 schedules can run fine if i run them seperately and 9 times out of 10 they run fine if I simulataneously run them from task scheduler. I do this by highlighting them all and then pressing run.

我有5个计划好的任务,每天早上9点半开始。计划基本上是一个vbs脚本,打开一个excel工作簿并运行一个宏。这5个调度如果我单独运行它们就可以运行得很好,如果我从任务调度程序中模拟运行它们,那么10个调度中有9个运行得很好。通过突出显示它们,然后按下run。

But sometimes when the task scheduler is doing its schedule they will fail. Sometimes all of them fail, sometimes some of them fail, but most of the time they all succeed.

但是有时候当任务调度程序执行它的调度时,它们会失败。有时他们都失败了,有时他们失败了,但大多数时候他们都成功了。

Once I okay the errors(will post this next time it occurs) I can see the excel.exe in my Processes in TaskManager they are left hanging. I cannot see them in Applications because I run them in the background. Whilst here I know I can right click on the excel.exe and do a Create Dump file, but not sure what to do with this.

一旦我确定了错误(将在下次发生时发布),我就可以看到excel了。在我的任务管理器的过程中,它们是挂着的。我在应用程序中看不到它们,因为我在后台运行它们。在这里,我可以右键单击excel。执行并创建转储文件,但不知道如何处理这个文件。

What I am interested here is discovering why they are failing? How do I debug it? Can I get a dump? how do i do this? I am sure the code is not perfect but the fact that they run fine seperately and most of the time fine together I am wondering is some memory resource getting used up at this time. This is what I would like to find out.

我感兴趣的是发现他们为什么失败?如何调试它?我能大便吗?我该怎么做呢?我确信代码不是完美的,但事实上它们是分开运行的,而且大多数时候一起运行都很好,我想知道在这个时候内存资源是否会被消耗掉。这就是我想知道的。

I know that i could space them out to run every minute, and this is something I might do but I would like to answer my questions above first.

我知道我可以把它们腾出来每一分钟,这是我可以做的,但是我想先回答我上面的问题。

Note: The vbs script in question can be found here in a previous question I asked.

注意:在前面的问题中,可以在这里找到问题的vbs脚本。

EDIT1 Some useful links I have come accross following Noodles answer:
WinDBG: The very basics
question re: reading dump file

下面是一些有用的链接:WinDBG:最基本的问题re:读取转储文件

EDIT2 If i right click on check for a solution I can click on View Technical Details and that gives me: 任务调度程序+间歇性失败+如何调试或获取转储+ windows7 ` Description Faulting Application Path: C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE

EDIT2如果右键单击检查解决方案我可以点击视图技术细节,给了我:“描述断层应用程序路径:\ Office14 \ EXCEL.EXE C:\Program Files (x86)\Microsoft办公室

Problem signature Problem Event Name: APPCRASH Application Name: EXCEL.EXE Application Version: 14.0.7128.5000 Application Timestamp: 5398dfdc Fault Module Name: EXCEL.EXE Fault Module Version: 14.0.7128.5000 Fault Module Timestamp: 5398dfdc Exception Code: c0000005 Exception Offset: 0023e751 OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 5129 Additional Information 1: 8bde Additional Information 2: 8bdedbea09a2027adb218b0e009eebf2 Additional Information 3: d4c1 Additional Information 4: d4c17b47443511f18e75ae920aa444bd

问题签名问题事件名称:APPCRASH应用程序名称:EXCEL。EXE应用程序版本:14.0.7128.5000应用程序时间戳:5398dfdc故障模块名称:EXCEL。故障模块版本:14.0.7128.5000故障模块时间戳:5398dfdc异常码:c0000005异常偏移:0023e751 OS版本:6.1.7601.2.2.1.256.4现场ID: 5129附加信息

Extra information about the problem Bucket ID: 361665432 `

关于问题桶ID的额外信息:361665432 '

EDIT3 : A useful walkthough example with commands

一个有用的带命令的演练示例

1 个解决方案

#1


1  

Crash Dumps

崩溃转储

Load in Windbg. Then File menu - Open Crash Dump. Type !analyze (note wrong spelling)

在Windbg负载。然后文件菜单-打开崩溃转储。类型!分析(注意拼写错误)

Debugging

调试

You can also start in a debugger.

您还可以在调试器中启动。

windbg or ntsd (ntsd is a console program and maybe installed). Both are also from Debugging Tools For Windows.

windbg或ntsd (ntsd是一个控制台程序,可能已经安装)。两者都来自Windows的调试工具。

Download and install Debugging Tools for Windows

下载并安装Windows的调试工具

http://msdn.microsoft.com/en-us/windows/hardware/hh852363

http://msdn.microsoft.com/en-us/windows/hardware/hh852363

Install the Windows SDK but just choose the debugging tools.

安装Windows SDK,但只需选择调试工具。

Create a folder called Symbols in C:\

在C:\中创建一个名为Symbols的文件夹

Start Windbg. File menu - Symbol File Path and enter

Windbg开始。文件菜单-符号文件路径和输入

srv*C:\symbols*http://msdl.microsoft.com/download/symbols

then

然后

windbg -o -g -G c:\windows\system32\cmd.exe /k batfile.bat

You can press F12 to stop it and kb will show the call stack (g continues the program). If there's errors it will also stop and show them.

您可以按F12停止它,kb将显示调用堆栈(g继续程序)。如果有错误,它也会停止并显示它们。

Type lm to list loaded modules, x ! to list the symbols and bp symbolname to set a breakpoint

类型lm到列表加载模块,x !列出要设置断点的符号和bp符号名称

If programming in VB6 then this environmental variable link=/pdb:none stores the symbols in the dll rather than seperate files. Make sure you compile the program with No Optimisations and tick the box for Create Symbolic Debug Info. Both on the Compile tab in the Project's Properties.

如果在VB6中编程,那么这个环境变量link=/pdb:没有将符号存储在dll中,而不是分离文件。确保您编译了没有优化的程序,并勾选创建符号调试信息的框。都在项目属性的Compile选项卡上。

Also CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx) can make symbols from type libraries.

CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx)也可以从类型库中生成符号。

You can schedule this command line instead.

您可以调度这个命令行。

Autostarting Programs in Debugger

启动项目的调试器

You can also make windbg attach to any specific program when started. See gflags.exe. Only in GUI mode.

您还可以使windbg附加到任何特定的程序时,启动。看到gflags.exe。只有在GUI模式。

Errors

错误

Also get the error number. TS keeps a history of runs and their errors. TS has a history tab.

也得到错误号。TS记录了运行的历史和错误。TS有一个历史标签。

.

#1


1  

Crash Dumps

崩溃转储

Load in Windbg. Then File menu - Open Crash Dump. Type !analyze (note wrong spelling)

在Windbg负载。然后文件菜单-打开崩溃转储。类型!分析(注意拼写错误)

Debugging

调试

You can also start in a debugger.

您还可以在调试器中启动。

windbg or ntsd (ntsd is a console program and maybe installed). Both are also from Debugging Tools For Windows.

windbg或ntsd (ntsd是一个控制台程序,可能已经安装)。两者都来自Windows的调试工具。

Download and install Debugging Tools for Windows

下载并安装Windows的调试工具

http://msdn.microsoft.com/en-us/windows/hardware/hh852363

http://msdn.microsoft.com/en-us/windows/hardware/hh852363

Install the Windows SDK but just choose the debugging tools.

安装Windows SDK,但只需选择调试工具。

Create a folder called Symbols in C:\

在C:\中创建一个名为Symbols的文件夹

Start Windbg. File menu - Symbol File Path and enter

Windbg开始。文件菜单-符号文件路径和输入

srv*C:\symbols*http://msdl.microsoft.com/download/symbols

then

然后

windbg -o -g -G c:\windows\system32\cmd.exe /k batfile.bat

You can press F12 to stop it and kb will show the call stack (g continues the program). If there's errors it will also stop and show them.

您可以按F12停止它,kb将显示调用堆栈(g继续程序)。如果有错误,它也会停止并显示它们。

Type lm to list loaded modules, x ! to list the symbols and bp symbolname to set a breakpoint

类型lm到列表加载模块,x !列出要设置断点的符号和bp符号名称

If programming in VB6 then this environmental variable link=/pdb:none stores the symbols in the dll rather than seperate files. Make sure you compile the program with No Optimisations and tick the box for Create Symbolic Debug Info. Both on the Compile tab in the Project's Properties.

如果在VB6中编程,那么这个环境变量link=/pdb:没有将符号存储在dll中,而不是分离文件。确保您编译了没有优化的程序,并勾选创建符号调试信息的框。都在项目属性的Compile选项卡上。

Also CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx) can make symbols from type libraries.

CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx)也可以从类型库中生成符号。

You can schedule this command line instead.

您可以调度这个命令行。

Autostarting Programs in Debugger

启动项目的调试器

You can also make windbg attach to any specific program when started. See gflags.exe. Only in GUI mode.

您还可以使windbg附加到任何特定的程序时,启动。看到gflags.exe。只有在GUI模式。

Errors

错误

Also get the error number. TS keeps a history of runs and their errors. TS has a history tab.

也得到错误号。TS记录了运行的历史和错误。TS有一个历史标签。

.