delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <42263F14.F52B1580@dessent.net> |
Date: | Wed, 02 Mar 2005 14:32:52 -0800 |
From: | Brian Dessent <brian AT dessent DOT net> |
Organization: | My own little world... |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: how to stop cron logging into NT eventlog ? |
References: | <422637DF DOT 5050101 AT free DOT fr> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
kagemaru wrote: > I would like to refer to this thread : > http://sourceware.org/ml/cygwin/2004-10/msg01322.html > > I have tried many options, like -1 and -2 options as advised but cron > still logs into the NT eventlog. It is the same on NT4, XP, W2K and W2K3. > > I have registered the service as : > > cygrunsrv -I "cygwin cron" -p /usr/sbin/cron -a -D -1 /var/log/cron.log -2 /var/log/cron.log > > Do you have a solution to avoid cron log in to eventlog ? cron calls syslog() directly to emit its messages, it doesn't use the facility of cygrunsrv that can redirect stdout and stderr to the syslog. Thus you won't be able to prevent it from logging in that manner. You can try placing a '-' character at the beginning of each crontab entry to prevent logging that action. See "man 5 crontab". If that does not work you'll need to compile cron to not use syslogging. I think you can do this by simply un-defining SYSLOG in config.h, in which case it will log to a file, /var/cron/log by default I think. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |