Merge branch 'patch-1' of https://github.com/gjones2/Freeside
[freeside.git] / FS / bin / freeside-monthly
index 1e41b78..69502a0 100755 (executable)
@@ -7,7 +7,7 @@ use FS::UID qw(adminsuidsetup);
 &untaint_argv; #what it sounds like  (eww)
 #use vars qw($opt_d $opt_v $opt_p $opt_a $opt_s $opt_y);
 use vars qw(%opt);
-getopts("p:a:d:vsy:", \%opt);
+getopts("p:a:d:vsy:m", \%opt);
 
 my $user = shift or die &usage;
 adminsuidsetup $user;
@@ -15,6 +15,9 @@ adminsuidsetup $user;
 use FS::Cron::bill qw(bill);
 bill(%opt, 'check_freq'=>'1m' );
 
+use FS::Cron::upload qw(upload);
+upload(%opt);
+
 ###
 # subroutines
 ###
@@ -61,7 +64,7 @@ the bill and collect methods of a cust_main object.  See L<FS::cust_main>.
       "pretend date" 15 days from whatever was specified by the -d switch
       (or now, if no -d switch was given).
 
-  -p: Only process customers with the specified payby (I<CARD>, I<DCRD>, I<CHEK>, I<DCHK>, I<BILL>, I<COMP>, I<LECB>)
+  -p: Only process customers with the specified payby (CARD, DCRD, CHEK, DCHK, BILL, COMP, LECB)
 
   -a: Only process customers with the specified agentnum
 
@@ -69,6 +72,8 @@ the bill and collect methods of a cust_main object.  See L<FS::cust_main>.
 
   -v: enable debugging
 
+  -m: Experimental multi-process mode (delay upload jobs until billing jobs complete)
+
 user: From the mapsecrets file - see config.html from the base documentation
 
 custnum: if one or more customer numbers are specified, only bills those