summaryrefslogtreecommitdiff
path: root/rhautoimport-rs
diff options
context:
space:
mode:
Diffstat (limited to 'rhautoimport-rs')
-rwxr-xr-xrhautoimport-rs20
1 files changed, 14 insertions, 6 deletions
diff --git a/rhautoimport-rs b/rhautoimport-rs
index 0dedf26..f525a6e 100755
--- a/rhautoimport-rs
+++ b/rhautoimport-rs
@@ -40,8 +40,20 @@ $XML::Feed::MULTIPLE_ENCLOSURES=1;
my $RD_GROUP = "radioStimm";
my $PV_ID = '75';
-if($#ARGV >= 0 && $ARGV[0] eq 'last') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+my $curweek = RHRD::utils::get_rd_week();
+my %week_table = ( 1 => 2, 2 => 6, 3 => 2, 4 => 6 );
+my $nextweek = $curweek == 4 ? 1 : $curweek + 1;
+
+if($#ARGV >= 0) {
+ if($curweek == 1 || $curweek == 3) {
+ if($ARGV[0] eq 'lastdi') {
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ }
+ } else {
+ if($ARGV[0] eq 'lastsa') {
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ }
+ }
}
@@ -65,10 +77,6 @@ if($show_id < 0) {
}
-my %week_table = ( 1 => 2, 2 => 6, 3 => 2, 4 => 6 );
-my $curweek = RHRD::utils::get_rd_week();
-my $nextweek = $curweek == 4 ? 1 : $curweek + 1;
-
my @today = Date::Calc::Today();
print "today: " . Date::Calc::Date_to_Text(@today) . "\n";