PowerShell script exchange
Post Reply
r.baumann
Lurker
Posts: 2
Liked: never
Joined: Oct 10, 2015 6:09 am
Full Name: Rene Baumann
Contact:

Duration/Run-time of a Tape-Job

Post by r.baumann »

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.
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

Before we proceed to scripting, I have a quick question - do you have Veeam ONE deployed or not? Thanks.
r.baumann
Lurker
Posts: 2
Liked: never
Joined: Oct 10, 2015 6:09 am
Full Name: Rene Baumann
Contact:

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

Post by r.baumann »

Hello Vladimir,

no Veeam ONE is not deployed.
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests