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?
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
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.
Put all of your related jobs into a single script and then use Run After.