I can't find the cmdlet to configure the number of retries and wait time for a job.
Please help

Code: Select all
Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your job"
$ScheduleOptions = $Job.GetScheduleOptions()
$ScheduleOptions.Retrytimes = "Number of retries"
$ScheduleOptions.Retrytimeout = "Timeout in minutes"
Set-VBRJobScheduleOptions -Job $Job -Options $ScheduleOptions
Code: Select all
> echo $ScheduleOptions |select Retrytimes
RetryTimes
----------
3
1
3
1
3
1
3
1
1
1
3
1
1
3
3
Code: Select all
> $ScheduleOptions.RetryTimes = "2"
I'm sure it's probably me, or my syntax.The property 'RetryTimes' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:1
+ $ScheduleOptions.RetryTimes = "2"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
$jobs is all my jobs, and $job is a single job.PS C:\Users\Administrator\Desktop> $job.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False CBackupJob System.Object
PS C:\Users\Administrator\Desktop> $jobs.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array
Code: Select all
foreach($Job in $ScheduleOptions){
$Job.ScheduleOptions.RetryTimes = "1"
$Job.Update()
}
Users browsing this forum: No registered users and 17 guests