Short Description
Modifies SureBackup job schedule options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
This cmdlet provides three parameter sets:
- For modifying daily schedule
Set-VSBJobSchedule [-Job] <CSbJob> [-Daily <SwitchParameter>] [-At <DateTime>] [-DailyKind <DailyOptions+DailyKinds>] [-Days <DayOfWeek[]>] [<CommonParameters>] |
- For modifying monthly schedule
Set-VSBJobSchedule [-Job] <CSbJob> [-At <DateTime>] [-Days <DayOfWeek[]>] [-Monthly <SwitchParameter>][-NumberInMonth <EDayNumberInMonth>] [-Months <EMonth[]>] [<CommonParameters>] |
- For running a SureBackup job after a certain job
Set-VSBJobSchedule [-Job] <CSbJob> [-After <SwitchParameter>] [-AfterJob <CBackupJob>] [<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
To modify settings enter the necessary parameters with new values. The parameters that you omit will remain unchanged.
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. | 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. | 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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This example shows how to modify the daily schedule the SureBackup jobs. The jobs will run at 11 PM on weekdays.
- Run Get-VSBJob to get the required jobs. Save the result to the $jobs variable.
- Run Set-VSBJobSchedule with the $jobs variable.
PS C:\PS> $jobs = Get-VSBJob -Name "SureBackup Job 01", "SureBackup Job 05" PS C:\PS> Set-VSBJobSchedule -Job $jobs -Daily -At "11" -DailyKind Weekdays |
Example 2
This example shows how to modify the monthly schedule for SureBackup jobs. The jobs will run every last Saturday at 12 PM in February, May, August and December.
- Run Get-VSBJob to get the required jobs. Save the result to the $jobs variable.
- Run Set-VSBJobSchedule with the $jobs variable.
PS C:\PS> $jobs = Get-VSBJob -Name *SureJob* PS C:\PS> Set-VSBJobSchedule -Job $jobs -Monthly -At "12" -NumberInMonth Last -Days Saturday -Months February, May, August, December |
Example 3
This example shows how to modify the schedule for the SureBackup job. The job will run after the selected backup job.
- Run Get-VSBJob to get the SureBackup job. Save the result to the $surejob variable.
- Run Get-VBRJob to get the backup job. Save the result to the $afterjob variable.
- Run Set-VSBJobSchedule with the $jobs and $afterjob variables.
PS C:\PS> $surejob = Get-VSBJob -Name "SureBackup Job 01" PS C:\PS> $afterjob = Get-VBRJob - Name "Backup job" PS C:\PS> Set-VSBJobSchedule -Job $surejob -After -AfterJob $afterjob |
Related Commands