Discussions specific to the VMware vSphere hypervisor
Post Reply
MarcinS
Enthusiast
Posts: 29
Liked: 2 times
Joined: May 18, 2015 8:31 am
Contact:

Start-VBRJob & chain

Post by MarcinS » Nov 04, 2015 9:47 am

Hi Guys,

i have 2 jobs (1 backup and 1 replica). Replica job should go when backup job finish

- when i start backup job manually it work cause ask that there are jobs in chain and ask if replica should be started
- when i start backup job from scheduler it also work ....and replica is started after backup finish

unfortunately i found that when i start backub job by script

Get-VBRJob -Name "BckJob" | Start-VBRJob -RunAsync

it not start replica after it. Is any syntax to add for Start-VBRJob command to start also jobs in chain ?

Vitaliy S.
Product Manager
Posts: 22993
Liked: 1556 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Start-VBRJob & chain

Post by Vitaliy S. » Nov 05, 2015 11:42 am

Hi MarcinS,

Can you please tell me why would you like to chain these jobs? Do you process the same VMs with them or there are some other considerations? As to chaining jobs with PowerShell, then I believe you just need to trigger them via separate cmdlets in the same script, our PS community should assist you with the script.

Thanks!

veremin
Product Manager
Posts: 16897
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Start-VBRJob & chain

Post by veremin » Nov 09, 2015 8:32 am

Start-VBRJob doesn't take care about chained jobs, indeed. Thus, to execute job in required order you have to start them one by one, similar to the following:

Code: Select all

Start-VBRJob -Job $Job1
Start-VBRJob -Job $Job2
Start-VBRJob -Job $Job3
Thnaks.

Post Reply

Who is online

Users browsing this forum: DGrinev and 14 guests