Greetings: I'm trying to setup a shell script to run regularly, and thus far, all my quests for information have turned up dry, so I am hoping this list will provide what I seek.. I have this shell script, demonstrating the attendant permissions: shaggy:~ # cat archmrtg.sh #!/bin/sh export FILEDATE=`date +%m%d%Y` export ARCHDIR=$1"archive/"$FILEDATE mkdir $ARCHDIR cp $1index.html $ARCHDIR cp $1*day.png $ARCHDIR You have new mail in /var/mail/root shaggy:~ # ls -l archmrtg* -rwxr--r-- 1 root root 132 Jun 12 17:16 archmrtg.sh shaggy:~ # ...I am trying to run this file in CRON with this crontab entry: 31 17 * * * * /root/archmrtg.sh /db/shaggy_oravl01/opt/apache/htdocs/servers/laurel/ ...and I am getting this error, and I haven't been able to find any reference to it ANYWHERE....
From root@shaggy.nwtel.ca Thu Jun 12 17:31:01 2003 Return-Path: <root@shaggy.nwtel.ca> Delivered-To: root@shaggy.nwtel.ca Received: by shaggy.nwtel.ca (Postfix, from userid 0) id BB0E61D215; Thu, 12 Jun 2003 17:31:00 -0700 (PDT) From: root@shaggy.nwtel.ca (Cron Daemon) To: root@shaggy.nwtel.ca Subject: Cron <root@shaggy> * /root/archmrtg.sh /db/shaggy_oravl01/opt/apache/htdocs/servers/laurel/ X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/root> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=root> Message-Id: <20030613003100.BB0E61D215@shaggy.nwtel.ca> Date: Thu, 12 Jun 2003 17:31:00 -0700 (PDT)
/bin/sh: line 1: alert.pl: command not found ...has anyone seen this error before, and what can I do about it?? I am not using anything called alert.pl anywhere that I know of, and what does /sbin/sh want with it??? shaggy:~ # /bin/sh -version GNU bash, version 2.05b.0(1)-release (i586-suse-linux) Copyright (C) 2002 Free Software Foundation, Inc. shaggy:~ # Thanks in advance, Richard W. Richard Whittaker, CISSP System Manager NorthwesTel Inc. Whitehorse, YK (867) 393-7756
-----Original Message----- From: "Richard Whittaker" <RWHITTAKER@nwtel.ca> To: <suse-linux-e@suse.com> Cc: <richard@connections.yk.ca> Date: Thu, 12 Jun 2003 17:35:50 -0700 Subject: [SLE] CRON Anger...
Greetings:
I'm trying to setup a shell script to run regularly, and thus far, all my quests for information have turned up dry, so I am hoping this list will provide what I seek..
I have this shell script, demonstrating the attendant permissions:
shaggy:~ # cat archmrtg.sh #!/bin/sh export FILEDATE=`date +%m%d%Y` export ARCHDIR=$1"archive/"$FILEDATE
mkdir $ARCHDIR cp $1index.html $ARCHDIR cp $1*day.png $ARCHDIR You have new mail in /var/mail/root shaggy:~ # ls -l archmrtg* -rwxr--r-- 1 root root 132 Jun 12 17:16 archmrtg.sh shaggy:~ #
...I am trying to run this file in CRON with this crontab entry:
31 17 * * * * /root/archmrtg.sh /db/shaggy_oravl01/opt/apache/htdocs/servers/laurel/
One to many * in the cron entry, there are only five fields for the date and time settings. Ken
* Richard Whittaker (RWHITTAKER@nwtel.ca) [030612 17:35]:
/bin/sh: line 1: alert.pl: command not found
alert.pl is an mrtg-related script and I'm guessing 'archmrtg.sh' also. The extra '*' the Ken pointed out is probably expanding to the list of files in /root or similar weirdness. -- -ckm
participants (3)
-
Christopher Mahmood
-
Ken Schneider
-
Richard Whittaker