Jump to content

go file, crontab and calling shell script.


RXWatcher

Recommended Posts

I'm trying to schedule a shell script in cron.

 

I've edited my go file per a forum post to add the entries into crontab:

 

# crontab stuff

crontab -l > /tmp/file.cron; cat >> /tmp/file.cron << EOT

# Run lftp every minute

* * * * * /boot/custom/pull.sh

* * * * * /boot/custom/watch.sh

EOT

crontab /tmp/file.cron; rm /tmp/file.cron

 

What I'm getting are emails saying that it cant find the scripts. I've tried putting them on a drive mounted under /mnt and as you can see in /boot/custom:

 

/bin/sh: /boot/custom/watch.sh

: No such file or directory

 

They exist in /boot/custom

-rwxrwxrwx  1 root root  584 Sep 24 21:33 watch.sh*

-rwxrwxrwx  1 root root  699 Sep 24 21:33 pull.sh*

 

 

Edit: I just tried /bin/sh /boot/custom/watch.sh via the shell and it did execute as expected.

 

Do you guys have any idea why cron cant find the scripts?

 

thanks!

-Jim

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...