Jump to content
NAKIVO Community Forum

How do I run a script only after a successful job?


Recommended Posts

Hi,

I have a script which ejects the medium after the job (via "post job script") and sends e-mails to employees to replace the medium. But this is also called if there was an error during the Job (failed run). (On failure the execution of the scrip should be stopped)

How can I control the script so that it is only called if the job is executed successfully?
Can I somehow run a script only as a job? Then I could start this as a following job if the main-job was successful ("Run this job After successful runs").

Or is there another way to control the execution of the scrips? 

Kind Regards
Jens

System: Synology DS920+, NAKIVO 10.2.0 (build 53298 from 31 Mar 2021); Tandberg RDX USB 3.0

  • Like 1
Link to comment
Share on other sites

12 hours ago, Jens Kupka said:

Hi,

I have a script which ejects the medium after the job (via "post job script") and sends e-mails to employees to replace the medium. But this is also called if there was an error during the Job (failed run). (On failure the execution of the scrip should be stopped)

How can I control the script so that it is only called if the job is executed successfully?
Can I somehow run a script only as a job? Then I could start this as a following job if the main-job was successful ("Run this job After successful runs").

Or is there another way to control the execution of the scrips? 

Kind Regards
Jens

System: Synology DS920+, NAKIVO 10.2.0 (build 53298 from 31 Mar 2021); Tandberg RDX USB 3.0

Hi, @Jens Kupka!

Pre- and post-job scripts are executed disregarding a job result. But, under an enterprise-grade license, the site recovery job is available. It allows running custom scripts (not only on a Director host but on any accessible virtual or physical host), checking different conditions, and many others. 

For more informations please check https://helpcenter.nakivo.com/display/NH/Site+Recovery+Job+Wizard%3A+Actions

Let me know if you need any further information!

Link to comment
Share on other sites

14 hours ago, Official Moderator said:

Hi, @Jens Kupka!

Pre- and post-job scripts are executed disregarding a job result. But, under an enterprise-grade license, the site recovery job is available. It allows running custom scripts (not only on a Director host but on any accessible virtual or physical host), checking different conditions, and many others. 

For more informations please check https://helpcenter.nakivo.com/display/NH/Site+Recovery+Job+Wizard%3A+Actions

Let me know if you need any further information!

Hi, thank you very much for the information. It is unfortunate that it is not possible in our version😞 But thanks anyway for the quick reply.
Kind regards, Jens

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...