error by doing a cron job...command not found...please help!!!

error by doing a cron job...command not found...please help!!!

Post by nik » Fri, 29 Jun 2001 21:05:30



hi,
i install a cronjob to activate webalizer once a day...

crontab -l    answers:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
MAILTO=admin

22 2 * * * admin /bin/webalizer -n www.discount.de -o
/www/vhtdocs/discount/statistik /www/vhtdocs/discount/log/access_log

when time is come i get a mail message:
/bin/bash: admin: command not found

when i use the cron command in a telnet line it works.

plese help!

 
 
 

error by doing a cron job...command not found...please help!!!

Post by Daniel Hobb » Fri, 29 Jun 2001 21:35:24



> hi,
> i install a cronjob to activate webalizer once a day...

> crontab -l    answers:

> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
> MAILTO=admin

> 22 2 * * * admin /bin/webalizer -n www.discount.de -o
> /www/vhtdocs/discount/statistik /www/vhtdocs/discount/log/access_log

> when time is come i get a mail message:
> /bin/bash: admin: command not found

> when i use the cron command in a telnet line it works.

admin is not a command.  You may want to script that and call the script
from crontab:

0 1 * * * /usr/local/sbin/scripts/webalize.sh > /dev/null 2>&1

#!/bin/sh
#webalize.sh
/sbin/webalizer -n www.discount.de -o /www/vhtdocs/discount/statistik
/www/vhtdocs/discount/log/access_log

then in /etc/aliases have the line:
admin:  myuser
root:   myuser

That way, if you want to also do something like DNS lookups, you only
need to add another line to have a temporary file for the addresses and
then delete the temp file at the end of the script.

Dan

 
 
 

error by doing a cron job...command not found...please help!!!

Post by Jorey Bum » Sat, 30 Jun 2001 02:42:36



> 22 2 * * * admin /bin/webalizer -n www.discount.de -o
> /www/vhtdocs/discount/statistik /www/vhtdocs/discount/log/access_log

> when time is come i get a mail message:
> /bin/bash: admin: command not found

The format for your personal crontab (i.e. crontab -e) is different than
that for /etc/crontab. In this case, just get rid of "admin" and it should
work.

Make sure the user admin is listed in /etc/cron.allow.

 
 
 

error by doing a cron job...command not found...please help!!!

Post by Kleykens Benn » Wed, 04 Jul 2001 00:40:25



> hi,
> i install a cronjob to activate webalizer once a day...

> crontab -l    answers:

> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
> MAILTO=admin

> 22 2 * * * admin /bin/webalizer -n www.discount.de -o
> /www/vhtdocs/discount/statistik /www/vhtdocs/discount/log/access_log

> when time is come i get a mail message:
> /bin/bash: admin: command not found

> when i use the cron command in a telnet line it works.

> plese help!


The syntax of the line is incorrect.
You do not need to add admin in front of the command-line, that is the
reason of your problem. Cron starts a shell and wants to start the
command :

admin /bin/webalizer -n www.discount.de -o
/www/vhtdocs/discount/statistik /www/vhtdocs/discount/log/access_log

But obviously can not find the command 'admin'

regards,

Benny

 
 
 

1. doing a find in a cron job for AIX 4.2

I have a line in a cron job for aix 3.2 that looks for a core dump, and
if found it removes the file(as follows):

0 4 * * 1,2,3,4,5 /usr/bin/find / -name core -exec rm -f {} \;

but for some reason it does not work after upgrading to AIX 4.2
It says "find: incomplete command".

Does anyone know why? Or how to get this find command to work within a
cron job?

Kenster

2. Implement "suspend to disk" in kernel/loader?

3. mv command not executing in cron job

4. How much does sa1 load the system

5. Daily cron job not redirecting error output

6. How do you delay a few MS in linux with C? Or does anyone have a servo control program for linux in C?

7. need to pipe a find or locate command into the rm command....PLEASE help!

8. USR Sportster 128K ISDN Modem with Linux

9. cron: command not found ???

10. need to pipe a find or locate command into the rm command....PLEASE help!

11. Help with CRON jobs, please!

12. Cron: root: command not found

13. CRON: /bin/bash: root: command not found