Add expiration alerts to freeside-daily routine
[freeside.git] / FS / bin / freeside-daily
index bda42f0..271c436 100755 (executable)
@@ -3,6 +3,7 @@
 use strict;
 use Getopt::Std;
 use FS::UID qw(adminsuidsetup);
+use FS::Conf;
 
 &untaint_argv; #what it sounds like  (eww)
 use vars qw(%opt);
@@ -14,6 +15,11 @@ adminsuidsetup $user;
 use FS::Cron::bill qw(bill);
 bill(%opt);
 
+# Send alerts about upcoming credit card expiration.
+use FS::Cron::alert_expiration qw(alert_expiration);
+my $conf = new FS::Conf;
+alert_expiration(%opt) if($conf->exists('alert_expiration'));
+
 #what to do about the below when using -m?  that is the question.
 
 #you don't want to skip this, besides, it should be cheap