diff --git a/misc/cronjobs/edi_cron.pl b/misc/cronjobs/edi_cron.pl index c3d1954fe6..8d1dd8c575 100755 --- a/misc/cronjobs/edi_cron.pl +++ b/misc/cronjobs/edi_cron.pl @@ -36,10 +36,14 @@ use Koha::EDI qw( process_quote process_invoice process_ordrsp ); use Koha::Edifact::Transport; use Koha::Logger; use Koha::Plugins::Handler; -use Fcntl qw( LOCK_EX O_CREAT O_RDWR SEEK_SET ); +use Fcntl qw( LOCK_EX O_CREAT O_RDWR SEEK_SET ); +use C4::Log qw( cronlogaction ); die "Syspref 'EDIFACT' is disabled" unless C4::Context->preference('EDIFACT'); +my $command_line_options = join( " ", @ARGV ); +cronlogaction( { info => $command_line_options } ); + # we dont have a lock dir in context so use the logdir my $logdir = C4::Context->config('logdir'); my $pidfile = "$logdir/edicron.pid"; @@ -150,6 +154,8 @@ if ( close $pid_handle ) { exit 1; } +cronlogaction( { action => 'End', info => "COMPLETED" } ); + sub check_pidfile { # sysopen my $fh, $pidfile, O_EXCL | O_RDWR or log_exit "$0 already running"