Set-VSBJobSchedule
Short Description
Modifies 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>] |
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 | Accept |
Job | Specifies the SureBackup job. The cmdlet will modify settings of this job. | True | Named | True (ByValue, | 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:
| 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 |
Number | For monthly schedule. Specifies the number of day in month (for example, Saturday):
| 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.
Related Commands