summaryrefslogtreecommitdiff
path: root/rhautoimport-rs
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-03-13 00:44:05 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-03-13 00:44:05 (GMT)
commit7ffd297bd4120690e45b7aa7d98f9c8472a1b3ec (patch)
tree7c554ae088e70a5ec849ed6e66ec025430c69c6a /rhautoimport-rs
parent66727097e79e98dc99b7c65105bb941ddf55e934 (diff)
added external bounding checks to respective scripts
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";