Re: Win32_ScheduledJob



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.
>


.



Relevant Pages

  • RE: Win32_ScheduledJob
    ... >When i am trying to list scheduled jobs via Win32_ScheduledJob ... >through the control panel scheduled tasks. ... >should i use something else than WMI? ... Wrapper Classes for the Windows Task Scheduler ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Task Scheduler stopped running and Im unable to restart
    ... restart the Task Scheduler. ... one of the files that one of the jobs was logging to had become corrupted ... You also could try System Restore if you have a ... I've down everything that I can think of to restart it. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Controlling the execution sequence of dependant jobs in JES2
    ... similar situation where we had one jcl deck that contained hundreds of jcls ... within the one deck. ... got around this by simply setting the priority of all input jobs to be the same ... I'm close to suggesting a RYO scheduler. ...
    (bit.listserv.ibm-main)
  • Re: ZEKE Job scheduler
    ... So you should be able to pull off all the K ... jobs, edit the input, and then put the jobs back out there as Z jobs. ... Anyone familiar with ASG ZEKE job scheduler? ...
    (bit.listserv.ibm-main)
  • Re: Question regarding Line Sequential files on MF Cobol running under HP-UX (by The Walrus I_Am
    ... 'mainframe tyranny', where the scheduler runs on a mainframe, which ... kicks off Unix jobs via Tuxedo or similar. ... We have the same situation -- a mainframe scheduler running Unix jobs through Maestro. ...
    (comp.lang.cobol)