StartCalendarInterval
public class StartCalendarInterval : Codable
This optional key causes the job to be started every calendar interval as specified.
Missing arguments are considered to be wildcard. The semantics are similar to crontab(5) in how firing dates are specified. Multiple dictionaries may be specified in an array to schedule multiple calendar intervals.
Unlike cron which skips job invocations when the computer is asleep, launchd will start the job the next time the computer wakes up. If multiple intervals transpire before the computer is woken, those events will be coalesced into one event upon wake from sleep.
Note
StartInterval and StartCalendarInterval are not aware of each other. They are evaluated completely independently by the system.-
The month (1-12) on which this job will be run.
Declaration
Swift
public var month: StartMonth?
-
The weekday on which this job will be run (0 and 7 are Sunday).
If both Day and Weekday are specificed, then the job will be started if either one matches the current date.
Declaration
Swift
public var weekday: StartWeekday?
-
Day of the month
Note
Bound to1...31
. Values outside the range will be set to the closest valid value.Declaration
Swift
public var day: Int? { get set }
-
Hour of the day
Note
Bound to0...23
. Values outside the range will be set to the closest valid value.Declaration
Swift
public var hour: Int? { get set }
-
Minute of the hour
Note
Bound to0...59
. Values outside the range will be set to the closest valid value.Declaration
Swift
public var minute: Int? { get set }
-
Set a calendar interval on which to start the job.
nil
values represent any occurance of that key.Declaration
Swift
public init(month: StartMonth? = nil, weekday: StartWeekday? = nil, day: Int? = nil, hour: Int? = nil, minute: Int? = nil)
Parameters
month
month of the year to run the job
weekday
day of the week to run the job
day
day of the month to run the job
hour
hour of the day to run the job
minute
minute of the hour to run the job
-
launchd.plist keys
See moreDeclaration
Swift
public enum CodingKeys : String, CodingKey