Kern Sibbald wrote:
>   Notes:  By Kern: I would prefer to have a single new Resource called
>           RunScript, and within that resource an additional directive:
> 
>             RunBeforeJob = Yes|No
> 
>           If no, it runs it after the job.

One could also make this:

        RunsWhen: Before | After

(defaulting to Before)


It could also be further consolidated like this:


Job {
    ...
    ...
    ...
    RunScripts {
        Script {
            Command = c:/bacula/systemstate.bat
            RunsWhen = Before           # Before | After
            RunsOnClient = yes          # yes | no
            RunsAtJobLevels = All       # All | Full | Diff | Inc
            AbortJobOnError = No        # yes | no
            RunsOnSuccess = Yes         # yes | no
            RunsOnFailure = Yes         # yes | no
        }
        Script {
            Command = ....
        }
    }
}

The AbortJobOnError, RunsOnSuccess and RunsOnFailure directives could be
optional, and possibly RunsWhen as well.

If omitted, RunsWhen would default to Before.

AbortJobOnError would be ignored unless RunsWhen was set to Before (or
RunsBefore Job set to Yes), and would default to Yes if omitted.  If
AbortJobOnError was set to No, failure of the script would still
generate a warning.

RunsOnSuccess would be ignored unless RunsWhen was set to After (or
RunsBeforeJob set to No), and default to Yes.

RunsOnFailure would be ignored unless RunsWhen was set to After, and
default to No.

Failure of scripts run after the job should always produce a warning.


-- 
 Phil Stracchino       [EMAIL PROTECTED]
    Renaissance Man, Unix generalist, Perl hacker
 Mobile: 603-216-7037         Landline: 603-886-3518


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to