Something like this to check if target is up or not
while [ $? -ne 0 ] ;
I think you can use a post install script to reboot the server. you can create just one Deploy Job with simple blpackage containing 1 item (external command with echo statement), and just have this Deploy Job to 'reboot at the end of job'. Schedule to run this job against any targets at any time. It will only have 1 blpackage.
My 2 cents on the above, I am not too sure about it.
Chandan:- I am not sure why u want me to check the target; as I have mentioned earlier that after 1st deploy job I am able to reboot the server but before server comes online the next deply job executed; since the server is not available the 2nd deploy job fails.
Prabha: Please explain a bit more on the above suggestion from you.
Thanks guys for ur suggestions.
The deploy job options should let you force a reboot after the job runs. Set that in the 1st job.
When you're explicitely running commands like shutdown, to bladelogic it's just another command. it executes it, and moves on to the next command, this is why you s the next job failing.
here's how you should do this:
In your Batch job options, make sure that it's set to run the child jobs sequentially.
The first Deploy Job in the list should have: job options / reboot options / "ignore item defined reboot setting and reboot at the end of job"
The second Job can be left alone as is.
In this case the second deploy job will wait till the first one completes, and the first one will not complete untill the server is back online after reboot.