Duration/Run-time of a Tape-Job

PowerShell script exchange

Duration/Run-time of a Tape-Job

Veeam Logoby r.baumann » Sat Oct 10, 2015 6:16 am

Hello,

I am looking for the possibility to check the runtime/duration of a TapeJob. My customer is using a Standard Edition of Veeam to a single drive. And I need to cancel a tapejob, if it is running longer
than 5 hours.
I tried to get this solved on my own, which the code-snippets in this forum, but I had no luck so far.
Any help is appreciated.
r.baumann
Lurker
 
Posts: 2
Liked: never
Joined: Sat Oct 10, 2015 6:09 am
Full Name: Rene Baumann

Re: Duration/Run-time of a Tape-Job

Veeam Logoby v.Eremin » Mon Oct 12, 2015 10:14 am

Before we proceed to scripting, I have a quick question - do you have Veeam ONE deployed or not? Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Duration/Run-time of a Tape-Job

Veeam Logoby r.baumann » Mon Oct 12, 2015 1:27 pm

Hello Vladimir,

no Veeam ONE is not deployed.
r.baumann
Lurker
 
Posts: 2
Liked: never
Joined: Sat Oct 10, 2015 6:09 am
Full Name: Rene Baumann

Re: Duration/Run-time of a Tape-Job

Veeam Logoby v.Eremin » Mon Oct 12, 2015 2:04 pm

You should get the latest job session, using Get-VBRSession commandlet with -Last parameter. Check whether it's still running. In case of positive answer, compare start and current times of the session. If the gotten value exceeds pre-defined number, stop the job, using Stop-VBRJob commandlet.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests