X-Spam-Check-By: sourceware.org Date: Fri, 3 Feb 2006 15:16:08 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Cygnut cc: cygwin AT cygwin DOT com Subject: Re: Running bash from cron In-Reply-To: <2745584.post@talk.nabble.com> Message-ID: References: <2744886 DOT post AT talk DOT nabble DOT com> <2745584 DOT post AT talk DOT nabble DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/