summaryrefslogtreecommitdiff
path: root/rhautoimport-er
diff options
context:
space:
mode:
Diffstat (limited to 'rhautoimport-er')
-rwxr-xr-xrhautoimport-er12
1 files changed, 7 insertions, 5 deletions
diff --git a/rhautoimport-er b/rhautoimport-er
index 34b431d..31033db 100755
--- a/rhautoimport-er
+++ b/rhautoimport-er
@@ -46,9 +46,13 @@ binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
-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;
+my $curweek = RHRD::utils::get_rd_week();
+
+if($curweek == 1 || $curweek == 3) {
+ 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;
+ }
}
@@ -65,8 +69,6 @@ if(scalar(@allowed_dbs) != 1) {
my $show_id = $allowed_dbs[0]->{'SHOWID'};
my $show_title = $allowed_dbs[0]->{'SHOWTITLE'};
-my $curweek = RHRD::utils::get_rd_week();
-
my @today = Date::Calc::Today();
my @import_date = Date::Calc::Standard_to_Business(@today);
$import_date[2] = 5;