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

Set-VBRJobSchedule

In this article

    Short Description

    Sets job schedule options.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus

    Syntax

    Set-VBRJobSchedule -Job <CBackupJob> [-Daily] [-At <datetime>] [-DailyKind <DailyKinds> {Everyday | WeekDays | SelectedDays}] [-Days <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [<CommonParameters>]

    -OR-

    Set-VBRJobSchedule -Job <CBackupJob> [-At <datetime>] [-Days <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [-Monthly] [-NumberInMonth <EDayNumberInMonth> {First | Second | Third | Fourth | Last | OnDay}] [-Months <EMonth[]> {January | February | March | April | May | June | July | August | September | October | November | December}] [-DayOfMonth <string>]  [<CommonParameters>]

    -OR-

    Set-VBRJobSchedule -Job <CBackupJob> [-Periodicaly] [-FullPeriod <int>] [-PeriodicallyKind <VBRPeriodicallyKinds> {Hours | Minutes | Continuously}] [-PeriodicallySchedule <VBRBackupWindowOptions>] [-PeriodicallyOffset <int>] [<CommonParameters>]

    -OR-

    Set-VBRJobSchedule -Job <CBackupJob> [-After] [-AfterJob <CBackupJob>]  [<CommonParameters>]

    Related Commands

    Get-VBRJob

    Detailed Description

    This cmdlet sets custom schedule settings to the selected job.

    You can schedule the job to run:

    • Daily on specific time, on specific days of week.
    • Monthly on specific time, on specific days of month, on specific months.
    • Periodically within specified period of time or continuously.
    • After a certain job you specify.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Job

    Specifies the job you want to set schedule to.

    You can assign multiple jobs to this object.

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    Daily

    For daily schedule.

    Sets job schedule to daily run.

    False

    Named

    False

    False

    At

    For daily schedule.

    Specifies the job start time. If not set, the job will start at 10:00 by default.

    False

    Named

    False

    False

    DailyKind

    For daily schedule.

    Specifies the days to run the job:

    • Everyday: the job will run everyday,
    • Weekdays: the job will run Monday through Friday,
    • SelectedDays: the job will run on specific days (i.e. Saturdays). Use the Days parameter to set the specific days.

    False

    Named

    False

    False

    Days

    For daily schedule.

    Specifies the days of week to run the job.

    False

    Named

    False

    False

    At

    For monthly schedule.

    Specifies the job start time. If not set, the job will start at 10:00 by default.

    False

    Named

    False

    False

    Days

    For monthly schedule.

    Specifies the day of week to run the job. Use this parameter to set the day for the NumberInMonth parameter,  i.e. to run the job on first Saturday every month.

    False

    Named

    False

    False

    Number
    InMonth

    For monthly schedule.

    Specifies the period condition for the job run: First/Second/Third/Forth/Last.

    Use this parameter to set the condition for the Days parameter, i.e. to run the job on first Saturday every month.

    False

    Named

    False

    False

    Monthly

    For monthly schedule.

    Sets job schedule to monthly run.

    False

    Named

    False

    False

    Months

    For monthly schedule.

    Specifies the months to run the job.

    False

    Named

    False

    False

    Periodicaly

    For periodically run.

    Sets job schedule to periodical run.

    False

    Named

    False

    False

    FullPeriod

    For periodically run.

    Sets the integer specifying value for the time period to run the job.

    Use this parameter to set the value for the PeriodicallyKind parameter.

    False

    Named

    False

    False

    Periodically
    Kind

    For periodically run.

    Specifies the measurement unit for the time period:

    • Hours: the job will run periodically in number of hours set in the FullPeriod parameter,
    • Minutes: the job will run periodically in number of minutes set in the FullPeriod parameter,
    • Continuously: the job will run continuously starting right after it has finished.

    Use this parameter to set the measure unit for the value set in the FullPeriod parameter.

    False

    Named

    False

    False

    Periodically
    Schedule

    For periodically run.

    Specifies the backup window.

    Accepts VBRBackupWindowOptions object.

     

     

     

     

    Periodically
    Offset

    For periodically run.

    Used to set the backup window. Allows to set the exact time for the job start.

    Specifies the time period (1-59 min). The job will start at the hour set in the backup window plus the indicated period.

    False

    Named

    False

    False

    After

    For running after a job.

    Sets job schedule to run after a specific job.

    False

    Named

    False

    False

    AfterJob

    For running after a job.

    Specifies the job after which you want to run this job.

    False

    Named

    False

    False

    <CommonParameters>

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

    Example 1

    This command sets a new schedule to jobs named "Backup Job 01" and "Backup Job 05". The jobs are obtained with Get-VBRJob and piped down. The jobs are scheduled to run daily at 23:00 on weekdays.

    PS C:\PS> Get-VBRJob -Name "Backup Job 01", "Backup Job 05" | Set-VBRJobSchedule -Daily -At "23:00" -DailyKind Weekdays

    Example 2

    This command schedules all replication jobs to monthly run. The replication jobs are obtained with Get-VBRJob and piped down. The jobs are scheduled to run every last Saturday at 12:00 in February, May, August and December.

    PS C:\PS> Get-VBRJob -Name Replica* | Set-VBRJobSchedule -Monthly -At "12:00" -NumberInMonth Last -Days Saturday  -Months February, May, August, December

    Example 3

    This command schedules the job represented by the $job variable to run every 12 hours. The job is obtained with Get-VBRJob and assigned to the variable beforehand.

    PS C:\PS> Set-VBRJobSchedule -Job $job -Periodicaly -FullPeriod 12 -PeriodicallyKind Hours

    Example 4

    This command schedules the job represented by the $job variable to run after the SureBackup job named SureBackup Job 01. The SureBackup Job 01 is obtained with Get-VSBJob and piped down. The backup job is obtained with Get-VBRJob and assigned to $job variable beforehand.

    PS C:\PS> Get-VSBJob -Name "SureBackup Job 01" | Set-VBRJobSchedule -After -AfterJob $job