diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-03-13 00:44:05 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-03-13 00:44:05 (GMT) |
commit | 7ffd297bd4120690e45b7aa7d98f9c8472a1b3ec (patch) | |
tree | 7c554ae088e70a5ec849ed6e66ec025430c69c6a /rhautoimport-tr | |
parent | 66727097e79e98dc99b7c65105bb941ddf55e934 (diff) |
added external bounding checks to respective scripts
Diffstat (limited to 'rhautoimport-tr')
-rwxr-xr-x | rhautoimport-tr | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rhautoimport-tr b/rhautoimport-tr index f9e16b2..c604f9d 100755 --- a/rhautoimport-tr +++ b/rhautoimport-tr @@ -39,6 +39,12 @@ $XML::Feed::MULTIPLE_ENCLOSURES=1; my $RD_GROUP = "tierrecht"; my $PV_ID = '506'; +my @today = Date::Calc::Standard_to_Business(Date::Calc::Today()); +if($today[2] == 5) { + print "please don't run this script on fridays!\n"; + exit 42; +} + if($#ARGV >= 0 && $ARGV[0] eq 'last') { print "!!!This is the last attempt, there won't be a retry on error!!!\n" } @@ -58,11 +64,6 @@ my $show_id = $allowed_dbs[0]->{'SHOWID'}; my $show_title = $allowed_dbs[0]->{'SHOWTITLE'}; -my @today = Date::Calc::Standard_to_Business(Date::Calc::Today()); -if($today[2] == 5) { - print "please don't run this script on fridays!\n"; - exit 42; -} my @broadcast_day = Date::Calc::Business_to_Standard($today[0], $today[1], 5); if($today[2] < 5) { @broadcast_day = Date::Calc::Add_Delta_Days(@broadcast_day, -7); |