如何在C#中获取Windows Server 2008 R2的计划任务列表 [英] How to get scheduled task list of Windows server 2008 R2 in C#

查看:176
本文介绍了如何在C#中获取Windows Server 2008 R2的计划任务列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C#中获取Windows Server 2008 R2的计划任务列表

解决方案

一种方法是对服务器执行WMI查询并从Win32_ScheduledJob查询,例如: http://technet.microsoft.com/en-us/library/ee176703.aspx [^ ].如果计划是使用AT完成的,则适用此规则.

如果任务是由控制面板"中的计划任务"创建的,则可以使用 Schtasks [ ^ ]


How to get scheduled task list of Windows server 2008 R2 in C#

解决方案

One way is to do a WMI query to the server and query from Win32_ScheduledJob, see for example: http://technet.microsoft.com/en-us/library/ee176703.aspx[^]. This applies if the scheduling is done using AT.

If the tasks are created by Scheduled tasks in Control Panel, you can use Schtasks[^]


这篇关于如何在C#中获取Windows Server 2008 R2的计划任务列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆