--- loncom/loncron 2011/04/23 16:18:49 1.88 +++ loncom/loncron 2011/05/14 16:12:53 1.89 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.88 2011/04/23 16:18:49 raeburn Exp $ +# $Id: loncron,v 1.89 2011/05/14 16:12:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,6 +32,7 @@ use strict; use lib '/home/httpd/lib/perl/'; use LONCAPA::Configuration; +use LONCAPA; use Apache::lonnet; use Apache::loncommon; @@ -821,8 +822,11 @@ sub main () { print $fh "$key\n"; } close($fh); - my $execpath = $perlvar{'lonDaemons'}.'/lciptables'; - system("$execpath $tmpfile"); + if (&LONCAPA::try_to_lock('/tmp/lock_lciptables')) { + my $execpath = $perlvar{'lonDaemons'}.'/lciptables'; + system("$execpath $tmpfile"); + unlink('/tmp/lock_lciptables'); # Remove the lock file. + } unlink($tmpfile); } }