Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've set up cron to run a simple hello world shell script, but it's giving me an error that Google isn't helping me resolve. I've got to be missing something really simple!

Here's my crontab:

MAILTO=me@domain.com
SHELL=/bin/bash
30 * * * * * $HOME/hello.sh

Here's hello.sh:

#!/bin/bash                                                                                       
echo HELLO WORLD!

I get this error email:

/bin/bash: 555: command not found

I have tried setting shell to /bin/sh but it makes no difference. I still get an analogous error message.

share|improve this question
    
If your question is answered, don't forget to mark a 'Best Answer!' –  jldugger Apr 3 '10 at 4:54
add comment

1 Answer

cron takes 5 parameters for the timing. You've given 6 (30 plus 5 *), so it's using the sixth to get the command name.

share|improve this answer
    
Thank you! I posted my update just as you posted your answer! –  carneades Apr 3 '10 at 4:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.