Dear all,Our issue is the following :I'd like to create a job which will switch the target server when the used one is off.How can we do that ?Thanks in advance,Regards
iwodcmd -host remote-server serverstatus
foreach my $server (@server_list){ if (is_server_up($server)){ do_deploy($server); }}sub is_server_up{ my $server = shift; my $results = qx($odhome/bin/iwodcmd -host $server serverstatus 2>&1); if ($?){ # not sure if this is sufficient, or if you'll have to parse $results return 0; } return 1;}sub do_deploy{ my $server = shift; my $cmd = qq($odhome/bin/iwodcmd start $config -k server=$server ...); my $results = qx($cmd 2>&1); if ($?){ # error }}
Thanks for your answer,we will surely use this solution when we will include deployment inside our TeamSite workflow but for the moment we use only scheduled OD deployments.Is there a solution to solve my issue in this case ?