delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/09/29/03:37:22

X-Spam-Check-By: sourceware.org
Subject: Cron problem
From: Joost Kraaijeveld <J DOT Kraaijeveld AT Askesis DOT nl>
To: cygwin AT cygwin DOT com
Date: Fri, 29 Sep 2006 09:36:58 +0200
Message-Id: <1159515418.5243.3.camel@panoramix>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.3
X-IsSubscribed: yes
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

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=jkr AT askesis DOT nl
* * * * * * /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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019