summaryrefslogtreecommitdiff
path: root/rhautoimport-pv
diff options
context:
space:
mode:
Diffstat (limited to 'rhautoimport-pv')
-rwxr-xr-xrhautoimport-pv10
1 files changed, 5 insertions, 5 deletions
diff --git a/rhautoimport-pv b/rhautoimport-pv
index ef7b1b5..430128e 100755
--- a/rhautoimport-pv
+++ b/rhautoimport-pv
@@ -49,7 +49,7 @@ binmode(STDERR, ":utf8");
my $curweek = RHRD::utils::get_rd_week();
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- if($curweek == 2 || $curweek == 4) {
+ if($curweek == 1 || $curweek == 3) {
print "!!!This is the last attempt, there won't be a retry on error!!!\n";
$LAST_RUN = 1;
}
@@ -74,14 +74,14 @@ my @today = Date::Calc::Today();
my @import_date = Date::Calc::Standard_to_Business(@today);
my $dow = $import_date[2];
-@import_date = Date::Calc::Business_to_Standard($import_date[0], $import_date[1], 1);
-if($dow == 1) {
- if($curweek == 1 || $curweek == 3) {
+@import_date = Date::Calc::Business_to_Standard($import_date[0], $import_date[1], 2);
+if($dow <= 2) {
+ if($curweek == 2 || $curweek == 4) {
@import_date = Date::Calc::Add_Delta_Days(@import_date, 7);
}
} else {
@import_date = Date::Calc::Add_Delta_Days(@import_date, 7);
- if($curweek == 2 || $curweek == 4) {
+ if($curweek == 1 || $curweek == 3) {
@import_date = Date::Calc::Add_Delta_Days(@import_date, 7);
}
}