Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
PowerShell Reference

Set-VBRServerScheduleOptions

Short Description

Modifies the schedule for Veeam Agent backup jobs.

Applies to

Product Edition: Community, Standard, Enterprise, Enterprise Plus

Syntax

Set-VBRServerScheduleOptions -Options <VBRServerScheduleOptions> [-Type <VBRServerScheduleType> {Daily | Monthly |Periodically | AfterJob}] [-DailyOptions <VBRDailyOptions>] [-MonthlyOptions <VBRMonthlyOptions>][-PeriodicallyOptions <VBRPeriodicallyOptions>] [-Job <CBackupJob>] [-EnableRetry] [-RetryCount <int>]
[-RetryTimeout <int>] [-EnableBackupTerminationWindow] [-TerminationWindow <VBRBackupWindowOptions>][<CommonParameters>]

Detailed Description

This cmdlet modifies schedule settings for the following types of jobs:

  • Veeam Agent jobs that back up Linux servers.
  • Veeam Agent jobs that back up failover clusters.
  • Veeam Agent jobs that back up Windows servers.
  • The backup policy that Veeam Agent job applies to Windows servers.

To modify settings, enter the necessary parameters with new values. The parameters that you omit will remain unchanged.

Set-VBRServerScheduleOptions Note:

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Options

Specifies the server schedule settings that you want to modify.

Accepts the VBRServerScheduleOptions type.

True

Named

True (ByValue)

 

Type

Specifies the Veeam Agent backup job schedule type.

  • Daily: use this option to run the job at a specific time daily.
  • Monthly: use this option to run the job once a month on specific days.
  • Periodically: use this option to run the job repeatedly throughout a day with a specific time interval.
  • AfterJob: use this option to create a chain of jobs. Veeam Backup & Replication will start the Veeam Agent Backup job after the other backup job.
    NOTE: The AfterJob option does not work for backup policy.

False

Named

False

 

DailyOptions

For daily schedule.

Specifies daily schedule settings. The cmdlet will create the server schedule with these settings.

Accepts the VBRDailyOptions type

False

Named

False

 

MonthlyOptions

For monthly schedule.

Specifies monthly schedule settings. The cmdlet will create the server schedule with these settings.

Accepts the VBRMonthlyOptions type.

False

Named

False

 

PeriodicallyOptions

For periodical run.

Specifies periodical schedule settings. The cmdlet will create the server schedule with these settings.

Accepts the VBRPeriodicallyOptions type.

False

Named

False

 

Job

For running after a job.

Specifies the name of the backup job after which Veeam Backup & Replication will run Veeam Agent backup jobs. The cmdlet will create the server schedule with these settings.

False

Named

False

 

EnableRetry

Indicates that Veeam Backup & Replication will attempt to run the Veeam Agent backup job again in case it fails.

False

Named

False

 

RetryCount

For the EnableRetry parameter.

Specifies the number of attempts to run the failed Veeam Agent backup job.

False

Named

False

 

RetryTimeout

For the EnableRetry parameter.

Specifies the time interval between retry attempts in minutes.

False

Named

False

 

EnableBackupTermination
Window

Indicates that Veeam Backup & Replication will stop the Veeam Agent backup job if it exceeds the backup window.

False

Named

False

 

TerminationWindow

Specifies the time interval within which the backup job must complete. The cmdlet will create the Veeam Agent backup job with these settings.

Accepts the VBRBackupWindowOptions type.

False

Named

False

 

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

Example

This example shows how to modify an existing schedule for a Veeam Agent backup job.

  1. Run Get-VBRJob to get the backup job that you want to modify. Save the result to the $job variable.
  2. Cast the backup job to the VBRComputerBackupJob type. Use the [Veeam.Backup.PowerShell.Infos.VBRComputerBackupJob]$ComputerBackupJob value.
  3. Get the ScheduleOptions object. Save the result to the $schedule variable.
  4. Cast the $schedule variable to the VBRServerScheduleOptions type. Use the [Veeam.Backup.PowerShell.Infos.VBRServerScheduleOptions]$ServerScheduleOptions value. Save the result to the $schedule variable.
  5. Run New-VBRPeriodicallyOptions to specify options for periodical job run. Save the result to the $period variable.
  6. Run New-VBRBackupWindowOptions to specify termination window settings. Save the result to the $termination variable.
  7. Run Set-VBRServerScheduleOptions with the $schedule, $period and $termination variables. Set the Periodically value for the Type parameter to change the schedule type from daily to periodical.

$job = Get-VBRJob -name "BackupJob"

[Veeam.Backup.PowerShell.Infos.VBRComputerBackupJob]$ComputerBackupJob=$job

$schedule = $computerbackupjob.ScheduleOptions

[Veeam.Backup.PowerShell.Infos.VBRServerScheduleOptions]$ServerScheduleOptions =$schedule

$period = New-VBRPeriodicallyOptions -PeriodicallyKind Hours -FullPeriod 12

$termination = New-VBRBackupWindowOptions -FromDay Friday -FromHour 17 -ToDay Monday -ToHour 8

Set-VBRServerScheduleOptions -Options $schedule -Type Periodically -PeriodicallyOptions $period -EnableBackupTerminationWindow -TerminationWindow $termination

Related Commands

New-VBRDailyOptions

New-VBRServerScheduleOptions

New-VBRPeriodicallyOptions

New-VBRBackupWindowOptions

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation