RXWatcher Posted September 25, 2015 Share Posted September 25, 2015 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
RXWatcher Posted September 25, 2015 Author Share Posted September 25, 2015 I think I solved this. It needed the /bin/sh in front of it. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.