Set-VBRJobScheduleOptions

In this article

    Short Description

    Applies modified job schedule settings to jobs.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    Set-VBRJobScheduleOptions [-Job] <CBackupJob[]> [-Options] <ScheduleOptions> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

    Detailed Description

    This cmdlet applies customized scheduling options to a selected backup, replication or copy job.

    Run New-VBRJobScheduleOptions to create the new schedule settings.

    You can modify schedule of backup, replication or backup copy jobs.

    Run Set-VSBJobScheduleOptions to set scheduling options to SureBackup job.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Job

    Specifies the array of jobs. The cmdlet will apply schedule settings to these jobs.

    True

    1

    True (ByValue,
    ByProperty
    Name)

    False

    Options

    Specifies the schedule options you want to apply.

    True

    2

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

    Example 1

    This example shows how to schedule the backup job to run repeatedly throughout a day with the time interval of 2 hours.

    1. Run New-VBRJobScheduleOptions to get the new job schedule settings object. Save the result to the $newschedule variable.
    2. Set the OptionsPeriodically property of the $newschedule variable to the $true value to run the job repeatedly.
    3. Specify the value for the OptionsPeriodically property in minutes to set the time interval for the job runs.
    4. Set the OptionsDaily property of the $newschedule variable to the $false value to disable the daily schedule option.
    5. Run Get-VBRJob to get the job whose schedule settings you want to modify. Save the result to the $job variable.
    6. Run Set-VBRJobScheduleOptions with the $job and $newschedule variables to apply the new schedule settings to the job.

    $newschedule = New-VBRJobScheduleOptions

    $newschedule.OptionsPeriodically.Enabled = $true

    $newschedule.OptionsPeriodically.FullPeriod = 120

    $newschedule.OptionsDaily.Enabled = $false

    $job = Get-VBRJob -Name "Backup Job 1"

    Set-VBRJobScheduleOptions -Job $job -Options $newschedule

    Example 2

    This command applies the customized scheduling options to the jobs named "DC Backup" and "DC File Copy". The jobs are obtained with Get-VBRJob and piped down. The options to apply are set to the $ScheduleOptions variable beforehand by running New-VBRJobScheduleOptions.

    Get-VBRJob -Name "DC Backup", "DC File Copy" | Set-VBRJobScheduleOptions -Options $ScheduleOptions

    Example 3

    This command applies the customized scheduling options to the job represented by the $job variable. The job is obtained with Get-VBRJob and assigned to the variable beforehand. The options to apply are set to the $ScheduleOptions variable beforehand by running New-VBRJobScheduleOptions.

    Set-VBRJobScheduleOptions -Job $job -Options $ScheduleOptions

    Related Commands

    Get-VBRJob

    New-VBRJobScheduleOptions