Set-VSBJobSchedule

In this article

    Short Description

    Modifies SureBackup job schedule options.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    Set-VSBJobSchedule [-Job] <CSbJob> [-Daily] [-At <DateTime>] [-DailyKind <DailyOptions+DailyKinds>] [-Days <DayOfWeek[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

    -OR-

    Set-VSBJobSchedule [-Job] <CSbJob> [-At <DateTime>] [-Days <DayOfWeek[]>] [-Monthly] [-NumberInMonth <EDayNumberInMonth>] [-Months <EMonth[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

    -OR-

    Set-VSBJobSchedule [-Job] <CSbJob> [-After] [-AfterJob <CBackupJob>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

    Detailed Description

    This cmdlet modifies schedule settings of a SureBackup 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,
    • After a certain job you specify.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Job

    Specifies the SureBackup job. The cmdlet will modify settings of this job.

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    Daily

    For daily schedule.

    Indicates that the SureBackup job runs daily. Use At and DailyKind parameters to specify the daily schedule.

    False

    Named

    False

    False

    At

    For daily schedule.

    Specifies the SureBackup job start time.

    Default: 10:00.

    False

    Named

    False

    False

    DailyKind

    For daily schedule.

    Specifies the days when the SureBackup job runs:

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

    False

    Named

    False

    False

    Days

    For daily schedule.

    Specifies the days of week when the SureBackup job runs.

    False

    Named

    False

    False

    At

    For monthly schedule.

    Specifies the SureBackup job start time.

    Default: 10:00.

    False

    Named

    False

    False

    Days

    For monthly schedule.

    Specifies the day of week when the SureBackup job runs. Use this parameter to set the day for NumberInMonth parameter, for examlpe, on first Saturday every month.

    False

    Named

    False

    False

    NumberInMonth

    For monthly schedule.

    Specifies the number of day in month (for example, Saturday):

    • First: the SureBackup job runs on the first (Saturday) of the selected months.
    • Second: the SureBackup job runs on the second (Saturday) of the selected months.
    • Third: the SureBackup job runs on the third (Saturday) of the selected months.
    • Forth: the SureBackup job runs on the first (Saturday) of the selected months.
    • Last: the SureBackup job runs on the last (Saturday) of the selected months.

    False

    Named

    False

    False

    Monthly

    For monthly schedule.

    Indicates that the SureBackup job runs once a month. Use Months, NumberInMonth and  Days parameters to set the monthly schedule.

    False

    Named

    False

    False

    Months

    For monthly schedule.

    Specifies the months when the SureBackup job runs.

    False

    Named

    False

    False

    After

    After this job.

    Indicates that the SureBackup job runs after a selected job. Use the AfterJob parameter to specify the primary job.

    False

    Named

    False

    False

    AfterJob

    After this job.

    Specifies the job after which the SureBackup job runs.

    False

    Named

    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 command schedules the jobs named "SureBackup Job 01" and "SureBackup Job 05" to run daily at 23:00 on weekdays. The SureBackup jobs object is obtained with Get-VSBJob and piped down.

    Get-VSBJob -Name "SureBackup Job 01", "SureBackup Job 05" | Set-VSBJobSchedule -Daily -At "23:00" -DailyKind Weekdays

    Example 2

    This command schedules all SureBackup jobs to run every last Saturday at 12:00 in February, May, August and December. The SureBackup jobs object is obtained with Get-VSBJob and piped down.

    Get-VSBJob -Name *SureJob* | Set-VSBJobSchedule -Monthly -At "12:00" -NumberInMonth Last -Days Saturday  -Months February, May, August, December

    Example 3

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

    Get-VSBJob -Name "SureBackup Job 01" | Set-VSBJobSchedule -After -AfterJob $job

    Related Commands

    Get-VSBJob

    Get-VBRJob