delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/03/15:16:17

X-Spam-Check-By: sourceware.org
Date: Fri, 3 Feb 2006 15:16:08 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Cygnut <s2audi AT yahoo DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Running bash from cron
In-Reply-To: <2745584.post@talk.nabble.com>
Message-ID: <Pine.GSO.4.63.0602031509340.3425@access1.cims.nyu.edu>
References: <2744886 DOT post AT talk DOT nabble DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0602031342140 DOT 3425 AT access1 DOT cims DOT nyu DOT edu> <2745584 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Fri, 3 Feb 2006, Cygnut (sent by Nabble.com) wrote:

> Thanks Igor. I already uninstalled crons and did this
>
> cygrunsrv -I cron -p /usr/sbin/cron -a -D
> cygrunsrv -S cron

Why not "/usr/bin/cron-config"?

> I put a simple script in there like this
> 51 * * * * /tmp/doit.sh

You forgot to redirect I/O.  If this script produces any output (on either
stdout or stderr), cron will likely try to mail it to you, and fail, since
you probably don't have an smtp daemon running.

> ran crontab `cat the above file`
> crontab -l yields above
> net stop cron
> net start cron < i realize this may not be required, but I am trying everything before writing >

The two lines above are the same as "cygrunsrv -E cron; cygrunsrv -S cron".

> doit.sh is
>
> #!/bin/bash
> PATH=/usr/bin:/bin
> echo OK > /tmp/OK
>
> at 52 minutes no /tmp/OK file

Try also adding "/bin/date >> /tmp/OK" (just to make sure you know *when*
the output was produced).

> /var/log/cron.log just says cron started

Did you also look in the Windows Event Log?

> How can I troubleshoot this ? I really need it to work or I have to
> write my program in f*cking vbscript, which I hate.

Calm down, take a deep breath.  Did you run cron_diagnose.sh?

Please read and follow the directions at

> Problem reports:       http://cygwin.com/problems.html

especially the part about attaching (as an uncompressed text *attachment*)
the output of "cygcheck -svr" on your system.  That will give us more
information to work with -- there are just too many things that can
produce the results you describe.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019