Yes luc, command 2 will be executed if command 1 fails.
This is only a "join" of separate runscript resources:
RunScript {
RunsWhen = Before
FailJobOnError = No
Command = "/etc/bacula/script_1.sh"
}
RunScript {
RunsWhen = Before
FailJobOnError = No
Command = "/etc/bacula/script_3.sh"
}
RunScript {
RunsWhen = Before
FailJobOnError = No
Command = "/etc/bacula/script_2.sh"
}
Best regards,
Ana
On Mon, May 11, 2015 at 10:16 AM, Luc Van der Veken <luc...@wimionline.com>
wrote:
> At the risk of sounding overly obvious --- ;)
>
>
>
> If you want to be absolutely certain, you can always take full control
> yourself: put the commands in a shell script, and execute that with a
> single Command line.
>
>
>
> Otherwise more questions arise, for instance if you have ‘FailJobOnError
> = yes’, will command 2 still be executed if command 1 fails?
>
>
>
>
>
> *From:* Alex Domoradov [mailto:alex....@gmail.com]
> *Sent:* 11 May 2015 14:17
> *To:* ZeroUno
> *Cc:* bacula-users
> *Subject:* Re: [Bacula-users] RunScript order of multiple Commands
>
>
>
>
>
> > Or are they executed in the order in which they are written in the
> configuration, with the second waiting for the first to complete and so on?
>
> it's seem so
>
> RunScript {
> RunsWhen = Before
> FailJobOnError = No
> Command = "/etc/bacula/script_1.sh"
> Command = "/etc/bacula/script_3.sh"
> Command = "/etc/bacula/script_2.sh"
> }
>
> # cat /etc/bacula/script_1.sh
> #!/bin/bash
> echo "command 1, $(date)" >> /tmp/1.log
> sleep 60
>
> # cat /etc/bacula/script_2.sh
> #!/bin/bash
> echo "command 2, $(date)" >> /tmp/1.log
> sleep 120
>
> # cat /etc/bacula/script_3.sh
> #!/bin/bash
> echo "command 3, $(date)" >> /tmp/1.log
> sleep 240
>
> # cat /tmp/1.log
> command 1, Mon May 11 12:08:49 UTC 2015
> command 3, Mon May 11 12:09:49 UTC 2015
> command 2, Mon May 11 12:13:49 UTC 2015
>
>
>
>
>
>
>
>
>
> On Mon, May 11, 2015 at 1:21 PM, ZeroUno <zerozerouno...@gmail.com> wrote:
>
> Hi,
> I'm using bacula 5.2.13 on RedHat 6.3 (cannot change version), and I
> have a very basic question to which I cannot find an answer online.
>
> In the description of the RunScript directive I read that you can
> specify more than one Command option per RunScript.
> But when you do it, in which order are the different Commands executed?
> Are they executed in random order, maybe even simultaneously?
> Or are they executed in the order in which they are written in the
> configuration, with the second waiting for the first to complete and so on?
>
> Thank you.
>
> --
> 01
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users