 | TriggerSetRepetition Method |
Note: This API is now obsolete.
Sets the repetition.
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax[ObsoleteAttribute("Set the Repetition property directly with a new instance of RepetitionPattern.",
false)]
public void SetRepetition(
TimeSpan interval,
TimeSpan duration,
bool stopAtDurationEnd = true
)
<ObsoleteAttribute("Set the Repetition property directly with a new instance of RepetitionPattern.",
false)>
Public Sub SetRepetition (
interval As TimeSpan,
duration As TimeSpan,
Optional stopAtDurationEnd As Boolean = true
)
public:
[ObsoleteAttribute(L"Set the Repetition property directly with a new instance of RepetitionPattern.",
false)]
void SetRepetition(
TimeSpan interval,
TimeSpan duration,
bool stopAtDurationEnd = true
)
Request Example
View SourceParameters
- interval
- Type: SystemTimeSpan
The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.
- duration
- Type: SystemTimeSpan
The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified,
the pattern is repeated indefinitely.
- stopAtDurationEnd (Optional)
- Type: SystemBoolean
if set to true the running instance of the task is stopped at the end of repetition pattern duration.
See Also