-
- Expert
- Posts: 129
- Liked: 34 times
- Joined: Mar 31, 2018 10:20 am
- Contact:
Get Job Schedule Status thru powershell?
Hello,
Using VBR9.5U3, I am trying to extract my jobs and their schedule (type and enabled/disabled scheduling).
Schedule type may be Daily, Monthly or Periodically but can also be depending of
the completion of a previous job.
Using get-vbrjob, I can retrieve settings :
$testjob=Get-VBRJobOptions -job "Test Backup"
$testjob.ScheduleOptions
I can retrieve enabled Daily/Monthly/Periodically job schedule options or
id of depending job using $testjob.ParentScheduleId if any. Great.
Thru console, I can edit job and set/unset "run job automatically".
Thru powershell, I can enable or disable job but
unfortunately, I cannot retrieve if job is enabled or not ...
Any idea ?
Thanks !
TH
Using VBR9.5U3, I am trying to extract my jobs and their schedule (type and enabled/disabled scheduling).
Schedule type may be Daily, Monthly or Periodically but can also be depending of
the completion of a previous job.
Using get-vbrjob, I can retrieve settings :
$testjob=Get-VBRJobOptions -job "Test Backup"
$testjob.ScheduleOptions
I can retrieve enabled Daily/Monthly/Periodically job schedule options or
id of depending job using $testjob.ParentScheduleId if any. Great.
Thru console, I can edit job and set/unset "run job automatically".
Thru powershell, I can enable or disable job but
unfortunately, I cannot retrieve if job is enabled or not ...
Any idea ?
Thanks !
TH
-
- Influencer
- Posts: 17
- Liked: 4 times
- Joined: Nov 16, 2018 3:14 pm
- Full Name: Lucas HELLMANN
- Location: Lyon, FRANCE
- Contact:
Re: Get Job Schedule Status thru powershell?
Hello,
Does this command found on this thread powershell-f26/check-back-copy-job-is-d ... 34787.html would help ?
Cheers,
Lucas H
Does this command found on this thread powershell-f26/check-back-copy-job-is-d ... 34787.html would help ?
Code: Select all
Get-VBRJob | where {$_.IsScheduleEnabled -eq $False} | select name
Lucas H
-
- Expert
- Posts: 129
- Liked: 34 times
- Joined: Mar 31, 2018 10:20 am
- Contact:
Re: Get Job Schedule Status thru powershell?
Hello,
I gave a check but for all of my unscheduled backup jobs,
the flag IsScheduleEnabled equals True
Bug ?
Thanks !
TH
I gave a check but for all of my unscheduled backup jobs,
the flag IsScheduleEnabled equals True
Bug ?
Thanks !
TH
-
- Influencer
- Posts: 17
- Liked: 4 times
- Joined: Nov 16, 2018 3:14 pm
- Full Name: Lucas HELLMANN
- Location: Lyon, FRANCE
- Contact:
Re: Get Job Schedule Status thru powershell?
Hello,
As I only had scheduled or disabled job I created an unschedule test Job, it also didn't appear when I tried the code, it has the ScheduleEnabled to true too. That seems strange yes.
Even when the GUI shows no Next Run, with powershell I see the Next Run in ScheduleOptions with the value corresponding to the right time if Next Run was enabled.
As I only had scheduled or disabled job I created an unschedule test Job, it also didn't appear when I tried the code, it has the ScheduleEnabled to true too. That seems strange yes.
Even when the GUI shows no Next Run, with powershell I see the Next Run in ScheduleOptions with the value corresponding to the right time if Next Run was enabled.
-
- Expert
- Posts: 129
- Liked: 34 times
- Joined: Mar 31, 2018 10:20 am
- Contact:
Re: Get Job Schedule Status thru powershell?
For what I can see, IsScheduleEnabled is turned True/False depending if job is enabled or disabled
but nothing regarding Scheduled or not (flag run the job automatically from Job -> Schedule pane)
Th
but nothing regarding Scheduled or not (flag run the job automatically from Job -> Schedule pane)
Th
-
- Product Manager
- Posts: 20397
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get Job Schedule Status thru powershell?
Check the following property (it should show $False for a job with enabled schedule):
Thanks!
Code: Select all
$Job = Get-VBRJob -name "Name of your Job"
$Job.Options.JobOptions.RunManually
-
- Expert
- Posts: 129
- Liked: 34 times
- Joined: Mar 31, 2018 10:20 am
- Contact:
Re: Get Job Schedule Status thru powershell?
Great ! Thanks !!! lol
Have a nice week-end !
Th
Have a nice week-end !
Th
-
- Product Manager
- Posts: 20397
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get Job Schedule Status thru powershell?
You too. Should other questions arise, don't hesitate to reach us. Thanks!
Who is online
Users browsing this forum: R.Timmons and 11 guests