X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=3.7 required=5.0 	tests=AWL,BAYES_00,BOTNET
X-Spam-Check-By: sourceware.org
Message-id: <0KYN004SUPWSFHF2@vms173013.mailsrvcs.net>
Date: Tue, 02 Mar 2010 08:37:39 -0500
To: pmcferrin@columbus.rr.com, Cygwin <cygwin@cygwin.com>
From: "Pierre A. Humblet" <Pierre.Humblet@ieee.org>
Subject: Re: cron fails to run as a service
In-reply-to: <4B8CBA93.3020007@columbus.rr.com>
References: <4B8CBA93.3020007@columbus.rr.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii; format=flowed
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

At 02:13 AM 3/2/2010, Paul McFerrin wrote:
>I've been using "cron" for more that a few weeks without any 
>problems, until my needs changed.  I installed cron as a service 
>using "cygrunsrv".  I keep getting errors about creating 
>lockfile.  I removed the lockfile but it got created again.  At 
>first, I got the Win32 error and ran the cron_diagnose.sh script and 
>got it further along but still nogo.  Attached is a copy of 
>"cronbug.txt" as instructed.  It is trying to start cron, but cron 
>fails to start as a service.  It run perfectly when not a service/
>
>One difference:  the service control manager added a "-n" option to 
>my cron command that I did not specify.  How can I turn off this feature??

Paul,

The -n switch keeps cron in the foreground. This is advisable when 
cron runs under cygrunsrv.

Some of your problems are due to launching a new cron daemon while an 
old one is still running.
If you experiment with cron, you can view the cron log by using "cronevents"

2010/03/01 01:38:45 [Paul] /usr/sbin/cron: PID 368: (CRON) STARTUP (V5.0)
2010/03/01 01:47:26 [Paul] /usr/sbin/cron: PID 2508: (CRON) DEATH 
(can't lock /var/run/cron.pid, otherpid may be 368: Resource 
temporarily unavailable)

I will think about your SIGHUP request when I have more time.
How do other Cygwin services handle this?

Pierre


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

