Merge branch 'patch-1' of https://github.com/gjones2/Freeside
[freeside.git] / FS / bin / freeside-daily
index 8e8ae4f..ac93aaf 100755 (executable)
@@ -4,6 +4,7 @@ use strict;
 use Getopt::Std;
 use FS::UID qw(adminsuidsetup);
 use FS::Conf;
+use FS::Log;
 
 &untaint_argv; #what it sounds like  (eww)
 use vars qw(%opt);
@@ -11,6 +12,8 @@ getopts("p:a:d:vl:sy:nmrkg:o", \%opt);
 
 my $user = shift or die &usage;
 adminsuidsetup $user;
+my $log = FS::Log->new('daily');
+$log->info('start');
 
 #you can skip this by not having a NetworkMonitoringSystem configured
 use FS::Cron::nms_report qw(nms_report);
@@ -74,6 +77,8 @@ unlink <${deldir}.CGItemp*>;
 use FS::Cron::backup qw(backup);
 backup();
 
+$log->info('finish');
+
 ###
 # subroutines
 ###
@@ -138,7 +143,7 @@ the bill and collect methods of a cust_main object.  See L<FS::cust_main>.
 
   -l: debugging level
 
-  -m: Experimental multi-process mode uses the job queue for multi-process and/or multi-machine billing.
+  -m: Multi-process mode uses the job queue for multi-process and/or multi-machine billing.
 
   -r: Multi-process mode dry run option