This is an archive version of the document. To get the most up-to-date information, see the current version.

Set-VBOJobSchedulePolicy

In this article

    Short Description

    Modifies backup job schedule settings.

    Syntax

    This cmdlet provides the following parameter sets.

    • Change daily job schedule type to periodical:

    Set-VBOJobSchedulePolicy -Policy <VBOJobSchedulePolicy> [-Type <VBOJobFrequencyType> {Periodically | Daily}] [-PeriodicallyEvery <VBOPeriodicInterval> {Minutes5 | Minutes10 | Minutes15 | Minutes30 | Hours1 | Hours2 | Hours4 | Hours8}] [-BackupWindowEnabled] [-BackupWindowSettings <VBOBackupWindowSettings>] [-RetryEnabled] [-RetryNumber <int>] [-RetryWaitInterval <int>] [-EnableSchedule]  [<CommonParameters>]

    • Change periodical job schedule type to daily:

    Set-VBOJobSchedulePolicy -Policy <VBOJobSchedulePolicy> [-Type <VBOJobFrequencyType> {Periodically | Daily}] [-DailyTime <timespan>] [-DailyType <VBODailyType> {Everyday | Workdays | Weekends | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday}] [-BackupWindowEnabled] [-BackupWindowSettings <VBOBackupWindowSettings>] [-RetryEnabled] [-RetryNumber <int>] [-RetryWaitInterval <int>] [-EnableSchedule]  [<CommonParameters>]

    Detailed Description

    This cmdlet modifies backup job schedule settings.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Policy

    Specifies the backup job schedule whose settings you want to modify.

    True

    Named

    False

    False

    Type

    Specifies the job schedule type:

    • Daily: runs the backup job on specific days.
    • Periodically: runs the backup job repeatedly throughout a day with a specific time interval.

    False

    Named

    False

    False

    DailyType

    Specifies the days when the backup job will run:

    • Everyday
    • Weekends
    • Workdays
    • Monday
    • Tuesday
    • Wednesday
    • Thursday
    • Friday
    • Saturday
    • Sunday

    False

    Named

    False

    False

    DailyTime

    Specifies the time when the job will start.

    False

    Named

    False

    False

    Periodically
    Every

    Specifies the time interval between the job runs:

    • Minutes5
    • Minutes10
    • Minutes15
    • Minutes30
    • Hours1
    • Hours2
    • Hours4
    • Hours8

    False

    Named

    False

    False

    Backup
    Window
    Enabled

    Indicates that the job run will be terminated if it exceeds the allowed backup window.

    False

    Named

    False

    False

    Backup
    Window

    Specifies the backup window of the backup job.

    For more information on how to create a backup window, see New-VBOBackupWindowSettings.

    False

    Named

    False

    False

    Retry
    Enabled

    Indicates that Veeam Backup for Microsoft Office 365 will attempt to run a backup job again if the job fails for some reason.

    False

    Named

    False

    False

    Retry
    Number

    Specifies the number of attempts to run the backup job.

    False

    Named

    False

    False

    Retry
    Wait
    Interval

    Specifies the time intervals between the job retry attempts (minutes):

    False

    Named

    False

    False

    EnableSchedule

    Indicates that the backup job will be configured to follow this schedule. Otherwise, the backup job will not be scheduled.

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

    Example 1

    This example shows how to modify the settings of a backup job schedule:

    • Veeam Backup for Microsoft Office 365 will now restart a backup job if it fails.
    • Veeam Backup for Microsoft Office 365 will now perform 4 attempts to retry a failed job with 1 minute interval.
    • A backup job will now stop if its processing exceeds the allowed backup window.

    You will need to perform the following steps:

    1. Run Get-VBOJob to get a backup job whose schedule settings you want to modify. Save the result to the $job variable.
    2. Get the job schedule settings that you want to modify. Use the SchedulePolicy property of the job object saved to the $job variable. Save the result to the $schedule variable.
    3. Run New-VBOBackupWindowSettings to create a backup window within which the backup job is allowed to run. Save the result to the $bwindow variable.
    4. Run Set-VBOJobSchedulePolicy with the $schedule and $bwindow variables to modify the job schedule settings.
    5. Run Set-VBOJob with the $job and $schedule variables to apply the schedule with the new settings to a backup job.

    $job = Get-VBOJob -Name "ABC: Sales"

    $schedule = $job.schedulepolicy

    $bwindow = New-VBOBackupWindowSettings -FromDay Monday -FromHour 8 -ToDay Sunday -ToHour 17 -Enabled

    Set-VBOJobSchedulePolicy -Policy $schedule -BackupWindowEnabled -BackupWindow $bwindow -RetryEnabled -RetryNumber 4 -RetryWaitInterval 1

    Set-VBOJob -Job $job -SchedulePolicy $schedule

    Example 2

    This example shows how to change the type of a job schedule from daily to periodical. A backup job per this schedule will now run every 2 hours.

    You will need to perform the following steps:

    1. Run Get-VBOJob to get a backup job whose schedule settings you want to modify. Save the result to the $job variable.
    2. Get the job schedule settings you want to modify. Use the SchedulePolicy property of the job object saved to the $job variable. Save the result to the $pschedule variable.
    3. Run Set-VBOJobSchedulePolicy with the $pschedule variable to modify the job schedule settings.
    4. Run Set-VBOJob with the $job and $pschedule variables to apply the schedule with the new settings to a backup job.

    $job = Get-VBOJob -Name "ABC: Sales"

    $pschedule = $job.schedulepolicy

    Set-VBOJobSchedulePolicy -Policy $pschedule -Type Periodically -PeriodicallyEvery Hours2

    Set-VBOJob -Job $job -SchedulePolicy $pschedule

    Example 3

    This example shows how to change the type of a job schedule from periodical to daily. A backup job per this schedule will now run on workdays at 08:00:00.

    You will need to perform the following steps:

    1. Run Get-VBOJob to get a backup job whose schedule settings you want to modify. Save the result to the $job variable.
    2. Get the job schedule settings you want to modify. Use the SchedulePolicy property of the job object saved to the $job variable. Save the result to the $dschedule variable.
    3. Run Set-VBOJobSchedulePolicy with the $dschedule variable to modify the job schedule settings.
    4. Run Set-VBOJob with the $job and $dschedule variables to apply the schedule with the new settings to a backup job.

    $job = Get-VBOJob -Name "ABC: Sales"

    $dschedule = $job.schedulepolicy

    Set-VBOJobSchedulePolicy -Policy $dschedule -Type Daily -DailyType Workdays -DailyTime 08:00:00

    Set-VBOJob -Job $job -SchedulePolicy $dschedule

    Related Commands

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.