https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15529

--- Comment #40 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> ---
+print "$0 is already running. Exiting.\n";
+#Send email to inform administrator another process_message_queue.pl cron was
attempted to run whilst previous execution of the file is taking place.
+# Configure accordingly
+MIME::Lite->send( 'smtp', '');
+my $email = MIME::Lite->new(
+To => ' ',
+From => ' ',
+Type => 'TEXT',
+Subject => 'process_message_queue.pl cron is already running',
+Data => 'process_message_queue.pl cron is already running',
+);
+
+$email->attach(
+Type => 'Text',
+ Data => 'process_message_queue.pl cron is already running',
 );
+$email->send();
+exit(1);
+}
I would say: Just print already running to STDERR and quit. No need to send
email. If the administrator wants an email, he can add MAILTO=root in cron.
No need to add MIME::Lite etc.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to