# Data Object - TaskScheduler(vim.scheduler.TaskScheduler)

Property of
  ScheduledTaskSpec
Extended by
  AfterStartupTaskScheduler, OnceTaskScheduler, RecurrentTaskScheduler
Extends
  DynamicData

## Data Object Description

The TaskScheduler data object is the base type for the scheduler objects. The hierarchy of scheduler objects is as follows:

        TaskScheduler
            AfterStartupTaskScheduler
            OnceTaskScheduler
            RecurrentTaskScheduler
                HourlyTaskScheduler
                    DailyTaskScheduler
                        WeeklyTaskScheduler
                        MonthlyTaskScheduler
                            MonthlyByDayTaskScheduler
                            MonthlyByWeekdayTaskScheduler

Use a scheduler object to set the time(s) for task execution. You can use two scheduling modes - single execution or recurring execution:

- Use the AfterStartupTaskScheduler or the OnceTaskScheduler to schedule a single instance of task execution.
- Use one of the recurrent task schedulers to schedule hourly, daily, weekly, or monthly task execution.

After you have established the task timing, use the scheduler object for the ScheduledTaskSpec scheduler property value.

Properties

Name | Type | Description
--- | --- | ---
activeTime* | xsd:dateTime | The time that the schedule for the task takes effect. Task activation is distinct from task execution. When you activate a task, its schedule starts, and when the next execution time occurs, the task will run. If you do not set activeTime, the activation time defaults to the time that you create the scheduled task.
expireTime* | xsd:dateTime | The time the schedule for the task expires. If you do not set expireTime, the schedule does not expire.
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="TaskScheduler"> <complexContent> <extension base="vsan:DynamicData"> <sequence> <element name="activeTime" type="xsd:dateTime" minOccurs="0"/> <element name="expireTime" type="xsd:dateTime" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>