If Saturday is NOT checked on the schedule part of the job, but it is specified as the day for the synthetic job to run, will it still run at 8PM on Saturday?
$JobOptions = Get-Vbrjob -name "Job name" | Get-VBRJobOptions
$JobOptions.BackupTargetOptions.TransformFullToSyntethic = $False
$JobOptions.BackupStorageOptions.EnableFullBackup = $False
$Job = Get-Vbrjob -name "Name of your job"
$OptionsToSet = $Job | Get-VBRJobOptions
$OptionsToSet.BackupTargetOptions.TransformFullToSyntethic = $True
$OptionsToSet.BackupTargetOptions.TransformToSyntethicDays = (Get-Date).DayOfWeek
Start-VBRJob -Job $Job
$OptionsToSet.BackupTargetOptions.TransformFullToSyntethic = $False
tsightler wrote:I think it might be easier to just have a post-job script that runs after each job run and, if it's Friday, changes the next scheduled run time to the weekend schedule, and if it's Sunday, changes it back to the weekday schedule. Or at least just use Windows task scheduler to toggle the scheduled run time back and forth as that script would be super easy, probably one-liner. To me that sounds easier than trying to trigger job runs manually all the time, but perhaps I missed the full use case.
Set-VBRJobSchedule -Job "<Job_Name>" -At "20:00" -Daily
Set-VBRJobSchedule -Job "<Job_Name>" -At "02:00" -Daily -DailyKind SelectedDays -Days Saturday
Set-VBRJobSchedule -Job "<Job_Name>" -At "20:00" -Daily -DailyKind Weekdays
cffit wrote:If Saturday is NOT checked on the schedule part of the job, but it is specified as the day for the synthetic job to run, will it still run at 8PM on Saturday?
tsightler wrote:Right, this is only changing the schedule. It's effectively the same as using the GUI to go to the schedule page in the job wizard and changing the scheduling options there. It will not impact other job settings such a active/synthetic/incremental.
Users browsing this forum: No registered users and 5 guests