Doubt about Runs Script Console/Command

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Doubt about Runs Script Console/Command

Wanderlei Huttel
1)Is there a way to execute multiples Run Script after Job (on server and on client)
and just execute the next Run Script if the prior Runs Script had finished?

2) Why bacula not allow to run another Job in RunsScript console command?



Best regards

Wanderlei Hüttel

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubt about Runs Script Console/Command

Josh Fisher

On 10/26/2016 5:35 AM, Wanderlei Huttel wrote:
1)Is there a way to execute multiples Run Script after Job (on server and on client)
and just execute the next Run Script if the prior Runs Script had finished?

While a RunScript directive can have multiple Command or Console options, the only way to run commands based on the output of other commands is to launch a wrapper script from the RunScript, and then run the real scripts from the wrapper script, checking exit status of each one and launching the next as needed.


2) Why bacula not allow to run another Job in RunsScript console command?

It does. You can specify more than one Command or Console option in a RunScript directive. I have never done this, so I do not know if the Commands/Console options are started congruently or one after the other in the order given. I suspect that it is the latter.

Also, if there is an error return from any of the Commands, then the job will print a warning. However, with the wrapper script approach, only the exit status of the wrapper script determines whether the warning is printed.




Best regards

Wanderlei Hüttel


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Loading...