delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/18/11:54:26

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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 18 Aug 2004 11:54:09 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Andrew DeFaria <Andrew AT DeFaria DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Cron problem/Documentation and Setup
In-Reply-To: <cfvsgu$vfk$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.61.0408181147440.1878@slinky.cs.nyu.edu>
References: <cfubt6$p1m$1 AT sea DOT gmane DOT org> <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20040817222639 DOT 029cb138 AT pop DOT prospeed DOT net> <cfvsgu$vfk$1 AT sea DOT gmane DOT org>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Wed, 18 Aug 2004, Andrew DeFaria wrote:

> Larry Hall wrote:
> 
> > At 09:39 PM 8/17/2004, you wrote:
> > 
> > > I'm having a problem with cron in this new environment. I cannot execute
> > > any of my own scripts in my ~/bin. I was also having problems executing
> > > even things in /tmp!
> > > 
> > > [snip]
> > > 
> > > As for my cron problem I can execute rudimentary commands such as ls, pwd
> > > and redirect the output to /tmp/debug.log. From that I can see that pwd
> > > tells me that I'm in /var/cron. The script I want to execute is under
> > > ~/bin (which is on a network share). I copied that script to /tmp and
> > > insured that it was set 777. Then I performed the following cron jobs:
> > > 
> > > 18 17 * * * pwd >> /tmp/debug.log 2>&1
> > > 19 17 * * * ls >> /tmp/debug.log 2>&1
> > > 20 17 * * * ls -l /tmp/myscript >> /tmp/debug.log 2>&1
> > > 21 17 * * * /tmp/myscript >> /tmp/debug.log 2>&1
> > > 
> > > Here's the result:
> > > 
> > > /var/cron
> > > tabs
> > > -rwxrwxrwx 1 TPAD3741 Domain U 5201 Aug 17 17:15 /tmp/myscript
> > > 
> > > /tmp/myscript never get's executed.
> > 
> > Sorry, can't really help here. There's just not enough information about
> > what your script does or what your environment for me to hazard a guess.
> > If you post more details or, better yet, a small test case, I can try it.
> > The simple test I did which just echos "Hello World" from a bash script
> > worked fine for me.
> 
> Well initially it was a Perl script that I'm trying to run through cron. 
> But I then stripped it down to just:
> 
> #!/bin/bash
> echo "testme" >> /tmp/debug.log 2>&1
> 
> Nothing additional got written into /tmp/debug.log.

You have, of course, reviewed

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

and thought of attaching the output of "cygcheck -svr", right?  Also, did 
you try "cron_diagnose.sh" (Google for it)?

I suspect some or all of your mounts may not be visible to cron...  Do 
your cron jobs above (i.e., 

19 17 * * * ls >> /tmp/debug.log 2>&1
20 17 * * * ls -l /tmp/myscript >> /tmp/debug.log 2>&1

) still work correctly after changing "ls" to "/bin/ls"?  Does changing 
"/tmp/myscript" to "sh -c '/tmp/myscript'" help any?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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