Enable "After this job" option

PowerShell script exchange

Enable "After this job" option

Veeam Logoby dcd62 » Fri Sep 09, 2016 8:17 pm

I was able to use a powershell script to schedule multiple replication jobs. I also used the following command to set the "After this job" option to the previous job.
Set-VBRJobSchedule -Job $CreateJobName -Afterjob $PrevJobName

But when I look at the job, the "After this job" is not enabled, I do see the correct previous job but it is grayed out.
The "Run the job automatically" is checked using: $JobnameObject.options.JobOptions.RunManually = $false

I can't figure out how to enable the "After this job" button.
I'm using Veeam B&R 8.0

thanks
dcd62
Enthusiast
 
Posts: 29
Liked: 4 times
Joined: Wed Aug 20, 2014 1:00 pm

Re: Enable "After this job" option

Veeam Logoby v.Eremin » Mon Sep 12, 2016 10:59 am

I can't figure out how to enable the "After this job" button. I'm using Veeam B&R 8.0.

If I'm not mistaken, it's a known issue with VB&R v8. Try to update to the latest product version and see whether it fixes the problem. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Enable "After this job" option

Veeam Logoby dcd62 » Mon Sep 12, 2016 1:38 pm

thanks
dcd62
Enthusiast
 
Posts: 29
Liked: 4 times
Joined: Wed Aug 20, 2014 1:00 pm

Re: Enable "After this job" option

Veeam Logoby snzhang2 » Mon Oct 31, 2016 3:54 am

I am trying to do the same in VB&R 9.0 and I am seeing the same behavior still.

> Set-VBRJobSchedule -Job $CIFSJob -Afterjob $TapeJob

After running the command above the AfterJob property of the $CIFSJob under Schedule does update to the $TapeJob name but it is not enabled. Is there a way to enable the 'after this job' option?
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Enable "After this job" option

Veeam Logoby snzhang2 » Mon Oct 31, 2016 3:58 am 1 person likes this post

I found the answer. It is actually documented in the cmdlet help documentation. Just after the switch -after and the Afterjob option will be enabled, like this:

> Set-VBRJobSchedule -Job $CIFSJob -after -Afterjob $TapeJob
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Enable "After this job" option

Veeam Logoby v.Eremin » Mon Oct 31, 2016 3:22 pm

Indeed, correct syntax includes usage of both parameters after and afterjob. The former enables job chaining, the latter sets a job after which modified job should be executed.

Glad to hear that you're able to find that information on your own.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Enable "After this job" option

Veeam Logoby snzhang2 » Fri Nov 18, 2016 6:37 pm

I found a curious issue when applying the regular (CIFS jobs) using -afterjob option to Tape jobs. Even with the -after option, the schedule for -afterjob job doesn't get activated, the same behavior as without applying the -after switch.

i.e,
> Set-VBRJobSchedule -Job $TapeJob after -Afterjob $CIFSJob
doesn't work

but
> Set-VBRJobSchedule -Job $CIFSJob -after -Afterjob $TapeJob
works

Is this a bug?
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Enable "After this job" option

Veeam Logoby v.Eremin » Sun Nov 20, 2016 2:35 pm

Nope, as tape job schedule is controlled by different set of cmdlets. Check this and this section of User Guide. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Enable "After this job" option

Veeam Logoby snzhang2 » Thu Dec 01, 2016 7:00 pm

Thanks. Always appreciate the quick response.

Will check it.
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Enable "After this job" option

Veeam Logoby v.Eremin » Thu Dec 01, 2016 9:24 pm

Speed is one of our core values. :)

Anyway, should additional help be needed, you know where to ask for it.
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 6 guests