3 # Run a command on multiple servers at once
6 require './cluster-cron-lib.pl';
8 @jobs = &list_cluster_jobs();
9 ($job) = grep { $_->{'cluster_id'} eq $ARGV[0] } @jobs;
10 $job || die "Job ID $ARGV[0] does not exist!";
11 $ENV{'SERVER_ROOT'} = $root_directory; # hack to make 'this server' work
12 &run_cluster_job($job, \&callback);
14 # callback(error, &server, message)
17 local $d = $_[1]->{'desc'} || $_[1]->{'host'};
20 print "Failed to run on $d : $_[2]\n\n";
25 print "Output from $d ..\n";