要使用TaskService获取正确的任务调度程序的LastTaskResult代码?

发布于 2025-02-13 12:19:13 字数 534 浏览 1 评论 0原文

使用taskservice,正在使用各个任务显示计划的任务,LastTaskResult。在taskService lastTaskResult的属性 int ,即,

// Summary:
//     Gets the results that were returned the last time the registered task was run.
//
// Remarks:
//     The value returned is the last exit code of the last program run via an Microsoft.Win32.TaskScheduler.ExecAction.
public int LastTaskResult { get; }

由于其数据类型为int,我不是在任务调度程序中获取确切的退出代码,如何获得整个lastaction结果?

Am displaying the scheduled tasks with the respective tasks and the lastTaskResult using the taskservice. In the taskservice the property of lastTaskResult is int, ie

// Summary:
//     Gets the results that were returned the last time the registered task was run.
//
// Remarks:
//     The value returned is the last exit code of the last program run via an Microsoft.Win32.TaskScheduler.ExecAction.
public int LastTaskResult { get; }

so since its datatype is int, I'm not getting the exact exit codes as available in the task scheduler,, how can I get the entire lastaction result?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文