1 package FS::Cron::tax_batch;
5 use base qw( Exporter );
6 @EXPORT_OK = 'process_tax_batch';
8 sub process_tax_batch {
10 my $engine = FS::TaxEngine->new;
11 return unless $engine->info->{batch};
13 # then there may be queued_bill jobs running; wait for them to finish
16 FS::queue->count("job = 'FS::cust_main::queued_bill' AND ".
17 "status != 'failed'");
18 last if $num_jobs == 0;
19 warn "Waiting for billing jobs to finish ($num_jobs still active)...\n";
23 $engine->transfer_batch(%opt);