Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There is a Run After parameter in Bacula configs. But what if I need to wait for several jobs to finish and then run my script?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Make all the jobs but one have the same priority, the same start time, and set concurrency to 1, and disallow mixed priorities. Then for the last job, set a lower priority, and schedule it so it starts a minute (or few) later than your other jobs. Put the Run After only on that last job.

For example, let's say you have job1, job2, job3, job4 and job5. job1-4 would have priority=10, and job5 would have priority=20 and Run After. What would happen is bacula will queue job1-4 to at the same time, but run them one by one (due to Maximum Concurrent Jobs = 1). Only when all of them complete, would a job5 be run (due to Allow Mixed Priority=no it will wait for all higher priority jobs to complete before it starts), and only when job5 completes, will bacula run Run After Job script). So, the script will be run only after all of job1-5 complete.

You can even keep concurrency higher than 1, if you want to run several jobs in parallel - it would still work.

share|improve this answer
    
looks like it should work) –  Sergey Oct 7 at 20:24

Put all of your related jobs into a single script and then use Run After.

share|improve this answer
    
What do you mean? How can I put bacula jobs configs into a script? –  Sergey Sep 21 '12 at 2:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.