aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-reports
diff options
context:
space:
mode:
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-xbin/send-reports12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 81be691e7..9651c271c 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -17,6 +17,7 @@ BEGIN {
require "$d/../setenv.pl";
}
+use Getopt::Long::Descriptive;
use CronFns;
use FixMyStreet;
@@ -25,4 +26,13 @@ use FixMyStreet::Script::Reports;
my $site = CronFns::site(FixMyStreet->config('BASE_URL'));
CronFns::language($site);
-FixMyStreet::Script::Reports::send();
+my ($opts, $usage) = describe_options(
+ '%c %o',
+ ['verbose|v', 'more verbose output'],
+ ['nomail', 'do not send any email, print instead'],
+ ['debug', 'always try and send reports (no back-off skipping)'],
+ ['help|h', "print usage message and exit" ],
+);
+$usage->die if $opts->help;
+
+FixMyStreet::Script::Reports::send($opts->verbose, $opts->nomail, $opts->debug);