Add PodeSchedule - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: Schedules schema: 2.0.0
Adds a new Schedule with logic to periodically invoke, defined using Cron Expressions.
Add-PodeSchedule -Name <String> -Cron <String[]> -ScriptBlock <ScriptBlock> [-Limit <Int32>]
[-StartTime <DateTime>] [-EndTime <DateTime>] [-ArgumentList <Hashtable>] [-Timeout <Int32>]
[-TimeoutFrom <String>] [-OnStart] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Add-PodeSchedule -Name <String> -Cron <String[]> [-Limit <Int32>] [-StartTime <DateTime>] [-EndTime <DateTime>]
-FilePath <String> [-ArgumentList <Hashtable>] [-Timeout <Int32>] [-TimeoutFrom <String>] [-OnStart]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Adds a new Schedule with logic to periodically invoke, defined using Cron Expressions.
Add-PodeSchedule -Name 'RunEveryMinute' -Cron '@minutely' -ScriptBlock { /* logic */ }
Add-PodeSchedule -Name 'RunEveryTuesday' -Cron '0 0 * * TUE' -ScriptBlock { /* logic */ }
Add-PodeSchedule -Name 'StartAfter2days' -Cron '@hourly' -StartTime [DateTime]::Now.AddDays(2) -ScriptBlock { /* logic */ }
Add-PodeSchedule -Name 'Args' -Cron '@minutely' -ScriptBlock { /* logic */ } -ArgumentList @{ Arg1 = 'value' }
A hashtable of arguments to supply to the Schedule's ScriptBlock.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
One, or an Array, of Cron Expressions to define when the Schedule should trigger.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A DateTime for when the Schedule should stop triggering, and be removed.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A literal, or relative, path to a file containing a ScriptBlock for the Schedule's logic.
Type: String
Parameter Sets: File
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The number of times the Schedule should trigger before being removed.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
The Name of the Schedule.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If supplied, the schedule will trigger when the server starts, regardless if the cron-expression matches the current time.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The script defining the Schedule's logic.
Type: ScriptBlock
Parameter Sets: Script
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A DateTime for when the Schedule should start triggering.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An optional timeout, in seconds, for the Schedule's logic. (Default: -1 [never timeout])
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: -1
Accept pipeline input: False
Accept wildcard characters: False
An optional timeout from either 'Create' or 'Start'. (Default: 'Create')
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Create
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.