PowerShell script exchange
Post Reply
Backerupper
Enthusiast
Posts: 47
Liked: 24 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Replica Jobs always show a Next Run value

Post by Backerupper »

I've noticed that unlike Backup jobs, Replica jobs seem to always have a value for NextRun even if the checkbox to run the job automatically is NOT checked in the gui.

Test:
Create new replica job and do not select to run the job automatically

$job = Get-VBRJob | ? Name -eq "My Replica Job"

$job.ScheduleOptions.NextRun will always have a value (regardless of job being scheduled or not)

If you drill further it appears as though PS thinks the jobs is scheduled daily
$job.ScheduleOptions.OptionsDaily.Enabled
returns True
All other options (monthly, periodically, continuous, etc) return False

The gui of course shows the Next Run for the job as <not scheduled>

Bug?

Is there any other way to determine via PS that a Replica job is not scheduled?

Bonus question - any ETA on a fix for NextRun bug on EP and Config Backup jobs?
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Replica Jobs always show a Next Run value

Post by PTide »

Hi,

Code: Select all

$j = Get-VBRJob -Name "Replication Job 1"
$j.GetOptions().JobOptions.RunManually
will return "True" if not scheduled and "False" if scheduled.
Bonus question - any ETA on a fix for NextRun bug on EP and Config Backup jobs?
I'm not sure if I correctly understand what bug you are talking about, could you elaborate please?

Thanks
Backerupper
Enthusiast
Posts: 47
Liked: 24 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Re: Replica Jobs always show a Next Run value

Post by Backerupper »

Cool, I'll try this method.

I did notice this morning that the NextRun had cleared overnight...bit odd.

Re bug - sorry, I should have linked - powershell-f26/get-vbrepjob-next-run-is ... 32970.html
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Replica Jobs always show a Next Run value

Post by PTide »

Configuration backup job bug is fixed and tested, EP bug is fixed but has not been fully tested as of yet.
veremin
Product Manager
Posts: 20411
Liked: 2300 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Replica Jobs always show a Next Run value

Post by veremin » 1 person likes this post

Small note: Pavel talks about the upcoming 9.5 release. Thanks.
Post Reply

Who is online

Users browsing this forum: iDeNt_5 and 13 guests