Re: Win32_ScheduledJob
- From: "Jonas" <jonaug@xxxxxxxxxxxxxxxx>
- Date: Wed, 24 Aug 2005 12:41:40 +0200
Hi Gary.
Thank you for your fast reply, and for further guidence in this case.
Regards
Jonas
""Gary Chang[MSFT]"" <v-garych@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:81rnulIqFHA.1208@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi Jonas,
>
>>When i am trying to list scheduled jobs via Win32_ScheduledJob
>>only get the job that has been created by wmi, not the jobs added
>>through the control panel scheduled tasks. Is this a know issue or
>>should i use something else than WMI?
>
> yes, such behavior is by design. WMI uses different technologies to create
> scheduled tasks from the one used by Control Panel|Schudled Tasks program.
> As a result, WMI script can only query out the tasks created by WMI code
> and AT command. The tasks created manually in Control Panel|Scheduled
> Tasks
> cannot be found by WMI code.
>
> However the Scheduled Task SDK API can query all scheduled task jobs
> including those created manually by
> Control Panel|Scheduled Tasks. But there is not a .NET framework built-in
> support to use these API, you need to write some COM Interop in your .NET
> program, it would be somehow complicated.
>
> Please refer to the following MSDN doc for the details and one VB.NET
> sample project which wrapped those Scheduled Task API:
>
> The Task Scheduler API
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/taskschd/ta
> skschd/about_the_task_scheduler.asp
>
> Wrapper Classes for the Windows Task Scheduler
> http://www.mvps.org/emorcillo/en/code/shell/tasksched.shtml
>
>
> Thanks!
>
> Best regards,
>
> Gary Chang
> Microsoft Community Support
> --------------------
> Get Secure! ¡§C www.microsoft.com/security
> Register to Access MSDN Managed Newsgroups!
> http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
.
- Follow-Ups:
- Re: Win32_ScheduledJob
- From: "Gary Chang[MSFT]"
- Re: Win32_ScheduledJob
- References:
- Win32_ScheduledJob
- From: Jonas
- RE: Win32_ScheduledJob
- From: "Gary Chang[MSFT]"
- Win32_ScheduledJob
- Prev by Date: Problem with GetType().InvokeMember
- Next by Date: Re: ActiveX type control or similar in C#
- Previous by thread: RE: Win32_ScheduledJob
- Next by thread: Re: Win32_ScheduledJob
- Index(es):
Relevant Pages
|