Set-VBRJobSchedule
Short Description
Modifies job schedule.
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>] |
Detailed Description
This cmdlet modifies schedule settings of a 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 | Accept |
Job | Specifies the job you want to edit. | True | Named | True (ByValue, | False |
Daily | For daily schedule. Indicates that the job runs daily. | False | Named | False | False |
At | For daily schedule. Specifies the job start time. Default: 10:00. | False | Named | False | False |
DailyKind | For daily schedule. Specifies the days to run the job:
| False | Named | False | False |
Days | For daily schedule. Specifies the days of week when the job will run. | False | Named | False | False |
Monthly | For monthly schedule. Indicates that the job runs once a month. | False | Named | False | False |
At | For monthly schedule. Specifies the job start time. Default: 10:00. | False | Named | False | False |
Number | For monthly schedule. Specifies the number of day in month (for example, Saturday):
| False | Named | False | False |
Days | For monthly schedule. Specifies the day of week for the NumberInMonth parameter. | False | Named | False | False |
Months | For monthly schedule. Specifies the months when the job will run: January, February, March, April, May, June, July, August, September, October, November, December. | False | Named | False | False |
Periodicaly | For periodical run. Indicates that the job runs periodically (for example, every 6 hours). Use FullPeriod and PeriodicallyKind parameters to set the periodical schedule. Use PeriodicallySchedule parameter to set backup window. | False | Named | False | False |
FullPeriod | For periodical run. Specifies the number of hours or minutes for the PeriodicallyKind parameter. | False | Named | False | False |
Periodically | For periodical run. Specifies the periodically schedule type:
| False | Named | False | False |
Periodically | For periodical run. Specifies the backup window. Accepts VBRBackupWindowOptions type. | False | Named | False | False |
Periodically | For periodical run. Used to set the exact time when the backup window starts. Specifies the number of minutes (1-59). The job will start at the hour set in the backup window plus the indicated period (for example, at 8:30). | False | Named | False | False |
After | For running after a job. Indicates that the job will start after another job. Use AfterJob parameter to set the primary 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 on common parameters, see the About CommonParameters section of Microsoft Docs.
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.
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.
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.
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.
Related Commands