-
- Influencer
- Posts: 19
- Liked: 1 time
- Joined: Nov 12, 2011 11:43 am
- Contact:
Get running job start time
hi,
what is the variable / commands to get start time of a running/active backup/replica job?
below commands did not work,
Get-VBRJob
job.getlaststate -ne "stopped"
Job.ScheduleOptions.StartDateTime
thanks.
what is the variable / commands to get start time of a running/active backup/replica job?
below commands did not work,
Get-VBRJob
job.getlaststate -ne "stopped"
Job.ScheduleOptions.StartDateTime
thanks.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get running job start time
The following one-liner should meet your expectations:
Hope this helps.
Thanks.
Code: Select all
asnp VeeamPSSnapin
Get-VBRJob | ?{$_.GetLastState() -eq "Running"} | Select name, {$_.ScheduleOptions.NextRun}
Thanks.
-
- Influencer
- Posts: 19
- Liked: 1 time
- Joined: Nov 12, 2011 11:43 am
- Contact:
Re: Get running job start time
nope, i ran this command while the job is running and it displays the next scheduled run time of the job.
PS C:\> Get-VBRJob | ?{$_.GetLastState() -ne "stopped"} | Select name, {$_.ScheduleOptions.NextRun}
Name $_.ScheduleOptions.NextRun
---- --------------------------
REP-SERVER 08/06/2013 08:02:00
what i am trying is to get the start time of a active job (while the job is running and not in stopped state). more like current backup session start time?
thanks.
PS C:\> Get-VBRJob | ?{$_.GetLastState() -ne "stopped"} | Select name, {$_.ScheduleOptions.NextRun}
Name $_.ScheduleOptions.NextRun
---- --------------------------
REP-SERVER 08/06/2013 08:02:00
what i am trying is to get the start time of a active job (while the job is running and not in stopped state). more like current backup session start time?
thanks.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get running job start time
You mean the time when a given job has been started?
Thanks.
Code: Select all
asnp VeeamPSSnapin
Get-VBRJob | ?{$_.GetLastState() –eq "Running"} | Select name, {$_.FindLastSession().creationtime}
-
- Influencer
- Posts: 19
- Liked: 1 time
- Joined: Nov 12, 2011 11:43 am
- Contact:
Re: Get running job start time
yes, thanks Vladimir!
on the right track now, aim is to check on jobs that runs for longer than usual ...
on the right track now, aim is to check on jobs that runs for longer than usual ...
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get running job start time
Ok. Then, it might be worth using the following examples.aim is to check on jobs that runs for longer than usual
This one will output all active jobs that have been running more than 2 hours (this is modifiable parameter; just replace 2 with whatever number you’re willing to):
Code: Select all
asnp VeeamPSSnapin
Get-VBRJob | ?{($_.GetLastState() -eq "Running") -and (((Get-Date) - $_.FindLastSession().CreationTime).TotalHours -gt '2')} | Select name, {$_.FindLastSession().creationtime}
Code: Select all
asnp VeeamPSSnapin
Get-VBRJob | ?{($_.GetLastState() -eq "Running") -and (((Get-Date) - $_.FindLastSession().CreationTime).TotalHours -gt '2')} | Stop-VBRJob
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get running job start time
Additionally, have you ever considered implementing Veeam ONE as the solution for tracking your Virtual, as well as Backup, infrastructure. Among others interesting features, there is a predefined alarm that tracks job duration.
Thanks.
Thanks.
-
- Influencer
- Posts: 19
- Liked: 1 time
- Joined: Nov 12, 2011 11:43 am
- Contact:
Re: Get running job start time
i did not know VeeamOne can track job duration.
thanks for your help ...
thanks for your help ...
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Get running job start time
You’re welcome. If any additional questions arise, don’t hesitate to let me know. Thanks.
Who is online
Users browsing this forum: No registered users and 11 guests