This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crontab


Ugh, top-posting.  Reformatted...

On Thu, 25 Aug 2005, Jean-Michel Douchain wrote:

> Igor Pechtchanski a écrit :
>
> > On Tue, 23 Aug 2005, Jean-Michel Douchain wrote:
> >
> > > I can't run automatically any program with cron??
> > > Can you help me??
> > >
> > > ------ crontab ------
> > > # DO NOT EDIT THIS FILE - edit the master and reinstall.
> > > # (/tmp/crontab.2272 installed on Tue Aug 23 17:00:18 2005)
> > > # (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $)
> > > 45 * * * * /cygdrive/c/sismalp/acqdata/sis
> > > 01 * * * * /cygdrive/c/sismalp/acqdata/es.csh
> >
> > Since you didn't redirect the output of either of the above commands,
> > cron will probably try (and fail) to find a working smtp service on
> > your machine to mail you the output.
> >
> > Why not try with the "hello world" of crontabs instead:
> >
> > ?:5 * * * * /bin/date >> /tmp/cron-date.out 2>&1
> >
> > and see if that works as expected (printing the date into
> > /tmp/cron-date.out every five minutes).
> >
> > Also, as René suggested, check the error logs.
>
> Hello,
> thanks for your response. I've tried your command line but with no
> success.

Huh?  You just said it works for you...

> When i simply do this:
>
> * * * * * /usr/bin/date >> /tmp/crontst
>
> the file crontst is created and i see each time the prog was executed in
> different line.

Yes, that's what it's supposed to do.  However, you didn't redirect
stderr, so any time your program tries to write something to stderr, cron
will try to mail you the output (and fail).

> But it's the only thing i can do!! When i run another simple program. It
> works well only when i execute it by hand, and it does nothing with
> cron!!

Did you check the error logs (as mentioned twice in this thread already)?

> If you have more ideas, it will help me.

Redirect *all* output from your program to a file.  Check that file to see
if the program ran.  You may want to redirect stdin from /dev/null, too,
in case the program is waiting for input somewhere.  And *check the error
logs*, that's what they're there for.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]