Skip to content

Latest commit

 

History

History
160 lines (80 loc) · 3.39 KB

PyITaskScheduler.md

File metadata and controls

160 lines (80 loc) · 3.39 KB

PyITaskScheduler

PyITaskScheduler Object

Interface to the Windows Task Scheduler

Methods

  • SetTargetComputer

    Connect to another machine to manage its tasks 

  • GetTargetComputer

    Returns name of computer that the Task Scheduler is connected to 

  • Enum

    Retrieve list of task names 

  • Activate

    Opens the specified task and returns an ITask interface for it 

  • Delete

    Delete task by name 

  • NewWorkItem

    Creates a new task 

  • AddWorkItem

    Create a new scheduled task from PyITask object 

  • IsOfType

    Check if named task supports specified interface 

PyITask = Activate(Name, riid

) Opens the specified task and returns an ITask interface for it

Parameters

  • Name : unicode

    Name of task to retreive

  • riid=IID_ITask : PyIID

    IID to return, currently only IID_ITask accepted

PyITaskScheduler.AddWorkItem

AddWorkItem(TaskName, WorkItem) Create a new scheduled task from PyITask object

Parameters

  • TaskName : unicode

    Name of task to be created

  • WorkItem : PyITask

    Existing PyITask object

Comments

The PyItask passed in is modified in place and on success is associated with the new task, not the old one

Delete(TaskName) Delete task by name

Parameters

  • TaskName : unicode

    Name of task to delete

PyUnicode,... = Enum() Retrieve list of task names

PyITaskScheduler.GetTargetComputer

unicode

= GetTargetComputer() Returns name of computer that the Task Scheduler is connected to

IsOfType(Name, riid) Check if named object supports specified interface

Parameters

  • Name : unicode

    Name of object

  • riid : PyIID

    Named object is checked that it supports the interface of this IID

PyITaskScheduler.NewWorkItem

PyITask = NewWorkItem(TaskName, rclsid

, riid

) Creates a new task

Parameters

  • TaskName : unicode

    Name of new task

  • rclsid=CLSID_CTask : PyIID

    Class id of work item, currently only CLSID_CTask (defaults if not passed in)

  • riid=IID_ITask : PyIID

    Interface IID to return, currently only IID_ITask (defaults if not passed in)

PyITaskScheduler.SetTargetComputer

SetTargetComputer(Computer) Connect to another machine to manage its tasks

Parameters

  • Computer : unicode

    Name of system to connect to

Comments

Leading backslashes are required. Call will succeed without them, but no other methods will work.