Cron problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cron problem

Joost Kraaijeveld
Hi,

I am trying to run a cron job on a Windows 2000 server. What I want is
to run a bash or sh shell script and mail the output to me on an other
machine.

Cron is running under the administrator account as a service.

For testing purposes I have a script that is in the home directory of
the administrator account and I want to run that every minute, sending
any output in a email to me.

I actually get an email every minute with the contents:

"/bin/sh: Mail: command not found"

I assume that I do not fully understand when to use what kind of paths
in my files (and cygwin is NOT in my system path because of name clashes
with other executables but is situated at d:\cygwin).

Can anyone point me in the right direction?


crontab.exe -l:

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.3424 installed on Fri Sep 29 08:38:58 2006)
# (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp
$)
# (Use to post in the top of your crontab)
# ------------- minute (0 - 59)
# | ----------- hour (0 - 23)
# | | --------- day of month (1 - 31)
# | | | ------- month (1 - 12)
# | | | | ----- day of week (0 - 6) (Sunday=0)
# | | | | |
# * * * * * command to be executed
MAILTO=[hidden email]
* * * * * * /bin/sh /home/Administrator/crontest

The script that should be run:
path in Cygwin: "/home/Administrator/crontest"
path in Windows: "d:\cygwin\home\Administrator\crontest"


#!/bin/sh

/bin/ls /
/bin/ls / > /home/Administrator/crontest.ls
#end of file




/bin/sh: Mail: command not found



--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

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

Reply | Threaded
Open this post in threaded view
|

Re: Cron problem

Joost Kraaijeveld
To respond to my own problem: a "*" too much in the crontab could
explain a lot .....

So problem solved.


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

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