LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   unable to run cron job (https://www.linuxquestions.org/questions/linux-general-1/unable-to-run-cron-job-338606/)

fahad26 06-30-2005 01:25 AM

unable to run cron job
 
Hi

i want to run a cron job.

at the promp i do

crontab -e

then i added

28 11 30 Jun * root echo "I LOVE U"


THE ERROR I GET IN /var/spool/mail/root is that

/bin/sh: root: command not found.


Please help:confused:

win32sux 06-30-2005 01:36 AM

Re: unable to run cron job
 
Quote:

Originally posted by fahad26
28 11 30 Jun * root echo "I LOVE U"


THE ERROR I GET IN /var/spool/mail/root is that

/bin/sh: root: command not found.

the error is caused because the way you wrote it you are telling cron you want to run the command "root" - which isn't a command... just put the command starting with the echo and you should be fine, since this is root's crontab, the commands wil run as root...
Code:

28 11 30 Jun * echo "I LOVE U"

zulfilee 06-30-2005 01:36 AM

SO why did you use that root for?

Remove ther word root in your cron entry and the command will work fine.

Cheers
Z

kencaz 06-30-2005 01:51 AM

You may also want to use "Banner" for your message. It will have a bigger effect...

KC


All times are GMT -5. The time now is 06:54 PM.