diff options
Diffstat (limited to 'rhautoimport-pv')
-rwxr-xr-x | rhautoimport-pv | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rhautoimport-pv b/rhautoimport-pv index 81d1d8e..d06a885 100755 --- a/rhautoimport-pv +++ b/rhautoimport-pv @@ -46,9 +46,13 @@ binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); +my $curweek = RHRD::utils::get_rd_week(); + if($#ARGV >= 0 && $ARGV[0] eq 'last') { - print "!!!This is the last attempt, there won't be a retry on error!!!\n"; - $LAST_RUN = 1; + if($curweek == 2 || $curweek == 4) { + print "!!!This is the last attempt, there won't be a retry on error!!!\n"; + $LAST_RUN = 1; + } } rhautoimport::report_title_and_last($TITLE, $LAST_RUN); @@ -67,7 +71,6 @@ my $show_id = $allowed_dbs[0]->{'SHOWID'}; my $show_title = $allowed_dbs[0]->{'SHOWTITLE'}; my @today = Date::Calc::Today(); -my $curweek = RHRD::utils::get_rd_week(); my @import_date = Date::Calc::Standard_to_Business(@today); my $dow = $import_date[2]; |