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

Set-VSBJobSchedule

In this article

    Short Description

    Sets SureBackup job schedule options.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Enterprise, Enterprise Plus

    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>]

    Related Commands

    Get-VSBJob

    Get-VBRJob

    Detailed Description

    This cmdlet sets custom schedule settings to the selected 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 you want to set schedule to. You can include multiple jobs into this object.

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    Daily

    For daily schedule.

    Sets SureBackup job schedule to daily run.

    False

    Named

    False

    False

    At

    For daily schedule.

    Specifies the SureBackup 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 SureBackup 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 SureBackup job.

    False

    Named

    False

    False

    At

    For monthly schedule.

    Specifies the SureBackup 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 SureBackup job. Use this parameter to set the day for -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 SureBackup 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 SureBackup job schedule to monthly run.

    False

    Named

    False

    False

    Months

    For monthly schedule.

    Specifies the months to run the SureBackup job.

    False

    Named

    False

    False

    After

    After this job.

    Sets SureBackup job schedule to run after a specific job.

    False

    Named

    False

    False

    AfterJob

    After this job.

    Specifies the job after which you want to run the SureBackup 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 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.

    PS C:\PS> 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.

    PS C:\PS> 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.

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