init(name:fireDate:timeZone:recurrence:recurrenceCalendar:)
Initializes a timer trigger with specified timing information.
Declaration
init(name: String, fireDate: Date, timeZone: TimeZone?, recurrence: DateComponents?, recurrenceCalendar: Calendar?)Parameters
- name:
The name of the timer trigger.
- fireDate:
The first fire date.
- timeZone:
The time zone for the first fire date. Pass
nilto use the default time zone. See Timezone for a description of how the time zone is interpreted. - recurrence:
The recurrence interval on which to fire the trigger.
nilindicates a one-time trigger. - recurrenceCalendar:
The calendar in which to evaluate the recurrence interval of a timer trigger. May be
nil, in which case the current calendar Current is used.
Return Value
A newly-initialized timer trigger with the specified values.
Discussion
A new timer trigger starts out disabled, and must be enabled using enable(_:completionHandler:) before use.