PowerShell script exchange
Post Reply
dcd62
Enthusiast
Posts: 39
Liked: 4 times
Joined: Aug 20, 2014 1:00 pm
Contact:

Enable "After this job" option

Post by dcd62 »

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

Re: Enable "After this job" option

Post by veremin »

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.
dcd62
Enthusiast
Posts: 39
Liked: 4 times
Joined: Aug 20, 2014 1:00 pm
Contact:

Re: Enable "After this job" option

Post by dcd62 »

thanks
snzhang2
Influencer
Posts: 22
Liked: 1 time
Joined: Oct 12, 2016 3:17 pm
Full Name: Nan Zhang
Contact:

Re: Enable "After this job" option

Post by snzhang2 »

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: Oct 12, 2016 3:17 pm
Full Name: Nan Zhang
Contact:

Re: Enable "After this job" option

Post by snzhang2 » 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
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Enable "After this job" option

Post by veremin »

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.
snzhang2
Influencer
Posts: 22
Liked: 1 time
Joined: Oct 12, 2016 3:17 pm
Full Name: Nan Zhang
Contact:

Re: Enable "After this job" option

Post by snzhang2 »

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

Re: Enable "After this job" option

Post by veremin »

Nope, as tape job schedule is controlled by different set of cmdlets. Check this and this section of User Guide. Thanks.
snzhang2
Influencer
Posts: 22
Liked: 1 time
Joined: Oct 12, 2016 3:17 pm
Full Name: Nan Zhang
Contact:

Re: Enable "After this job" option

Post by snzhang2 »

Thanks. Always appreciate the quick response.

Will check it.
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Enable "After this job" option

Post by veremin »

Speed is one of our core values. :)

Anyway, should additional help be needed, you know where to ask for it.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests