diff options
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); |