On Wed, 27 Mar 2013 13:38:40 +0000
William Hay wrote:
Hi,
[...]
> No for that you'd need to use the JSV or follow Mikael's suggestion.
few days ago I sent my jsv script to the list.
something like:
#!/usr/bin/perl
use strict;
use warnings;
no warnings qw/uninitialized/;
use Env qw(SGE_ROOT);
use lib "$SGE_ROOT/util/resources/jsv";
use JSV qw( :DEFAULT jsv_send_env jsv_log_info );
use Data::Dumper;
use Storable;
# my $sge_root = $ENV{SGE_ROOT};
# my $sge_arch = qx{$sge_root/util/arch};
jsv_on_start(sub {
jsv_send_env();
});
jsv_on_verify(sub {
my %params = jsv_get_param_hash();
my $do_correct = 0;
# You must ask for time limit
if (!(exists $params{l_hard}{h_rt})) {
jsv_sub_add_param('l_hard','h_rt','6:00:00');
jsv_log_info ('No time requested, default is 6h');
$do_correct = 1;
}
if ($do_correct) {
jsv_log_info ('put your error message here');
}
});
jsv_main();
if you want to reject the job, change jsv_sub_add_param and add this
line:
jsv_reject ('no time specified');
HTH,
Arnau
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users