delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/10/10:44:49

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
Date: Mon, 10 Oct 2005 10:44:38 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Orfeo Da Via <orfeo DOT davia AT microline-srl DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Cron problem
In-Reply-To: <Pine.WNT.4.58.0510101447130.1156@sn2307128>
Message-ID: <Pine.GSO.4.63.0510101029110.9685@slinky.cs.nyu.edu>
References: <Pine DOT WNT DOT 4 DOT 58 DOT 0510071413450 DOT 480 AT sn2307128> <Pine DOT GSO DOT 4 DOT 63 DOT 0510071005110 DOT 501 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT WNT DOT 4 DOT 58 DOT 0510071635180 DOT 572 AT sn2307128> <Pine DOT GSO DOT 4 DOT 63 DOT 0510071114350 DOT 501 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT WNT DOT 4 DOT 58 DOT 0510071835090 DOT 540 AT sn2307128> <Pine DOT GSO DOT 4 DOT 63 DOT 0510071320100 DOT 501 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT WNT DOT 4 DOT 58 DOT 0510081054270 DOT 1064 AT sn2307128> <Pine DOT GSO DOT 4 DOT 63 DOT 0510081628340 DOT 501 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT WNT DOT 4 DOT 58 DOT 0510100905460 DOT 1156 AT sn2307128> <Pine DOT GSO DOT 4 DOT 63 DOT 0510100805210 DOT 501 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT WNT DOT 4 DOT 58 DOT 0510101447130 DOT 1156 AT sn2307128>
MIME-Version: 1.0

Please make sure your mailer respects the Reply-To: header -- I set it for
a reason.  There's no need to send the message to my mailbox -- I read the
list.

On Mon, 10 Oct 2005, Orfeo Da Via wrote:

> On Mon, 10 Oct 2005, Igor Pechtchanski wrote:
>
> > > $ uname
> > >  Linux
> > >
> > > $ export VISUAL=zile
> > >
> > > $ crontab -e
> > >
> > >  ...edit the file..
> >
> > Hmm, one detail that's missing: when was the above done?  Before 8:00, or
> > after?
>
> About at 8.45, all the commands in the example are sequentially.

Interesting...  I thought the semantics were such that if the start time
is missed, the next day is used.  I'll have to re-read the cron
documentation.

> > Since you're testing cron, I would suggest starting with
> >
> > */5 * * * * /bin/date >> /home/calox/tmp/date.out 2>&1
> >
> > and waiting 5 minutes.  If /home/calox/tmp is still empty, then we'll
> > debug further.
>
> In my linux box the my home is /home/calox, in Cygwin my home is
> /home/micekiller, then the crontab is
>
> $  crontab -l
>  # DO NOT EDIT THIS FILE - edit the master and reinstall.
>  # (/tmp/crontab.592 installed on Mon Oct 10 14:51:37 2005)
>  # (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $)
>  */5 * * * * /bin/date >> /home/micekiller/tmp/date.out 2>&1
>
> so, I waited for 10 min but ~/tmp (/home/micekiller/tmp) is empty.

Is your user an administrative user?  Is your home on a network share?
Try changing the above to

*/5 * * * * /bin/date >> /tmp/date.out 2>&1

Does /tmp/date.out get created?

> > A few obvious questions: does /home/calox/tmp exist in Cygwin?  What are
> > its permissions (do an "ls -ld")?
>
> $ ls -ld ~/tmp/
>  drwxrwxrwx+ 2 micekiller None 0 Oct  8 11:03 /home/micekiller/tmp/
>
> Here the group in None, it's OK? (in Linux is the usergroup)...maybe in
> Cygwin isn't possible set the group?

It is possible, but the group shouldn't matter.  Note that '+' at the end
of the permission string means that there are extra ACLs set for that
directory -- some of these may deny the necessary access.

> > Are you checking /home/calox/tmp or
> > ~/tmp (IOW, is your $HOME set to /home/calox)?
>
> my $HOME is
>
> $ echo $HOME
>  /home/micekiller
>
> and I check /home/micekiller/tmp

Ok, just a sanity check.

> > And, finally, do you have SHELL set in the Windows environment, and if
> > so, to what value?
>
> Mmmm, in  'Control Panel-> System -> Advanced -> Environment variable' the
> SHELL variable *not* exists, but in Cygwin
>
> $ echo $SHELL
>  /bin/bash

That's ok -- bash sets SHELL if it's not set in the parent environment.

> If usefull, my environment var is (in win2000 cmd.exe)
>
> C:\>set
> [snip]
> PATH='/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/mnt/c/imagemagick:/usr/bin:/mnt/c/texmf/miktex/bin:/mnt/c/WINNT/system32:/mnt/c/WINNT:/mnt/c/shared:/mnt/c/WINNT/Microsoft.NET/Framework/v1.1.4322/:/mnt/c/gs/gs8.11/bin:/mnt/c/GnuWin32/bin:/mnt/c/Pico:/mnt/c/Program Files/Support Tools/:.:/cygdriver/c/texUtils/latex2html/bin:/cygdriver/c/Mono/bin:/opt/dar'

Aside from the fact that you seem to have run "set" from a bash shell,
whereas your prompt above is from a "cmd" shell, and that you use
"/cygdriver" instead of the standard "/cygdrive", the output looks fine.

FWIW, I just installed "cron" from scratch using /usr/bin/cron-config, put

*/5 * * * * /bin/date >> /tmp/date.out 2>&1

in my crontab, and sure enough, /tmp/date.out got created.  Try that one
first, and if it works, you'll know that there is some issue with your
home directory that prevents cron from writing there.

BTW, what are the permissions on /home and /home/micekiller?  They have
to have at least the execute bits set for /home/micekiller/tmp to be
accessible.
HTH,
	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!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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