setup cronjob

CyberLeo Kitsana cyberleo at cyberleo.net
Fri Sep 12 06:14:45 UTC 2008


Darrell Betts wrote:
> I have wrote a small script put it in my home directory. I am trying to
> setup a cronjob to run it every six hours. When it runs the job I
> receive the error message " /usr/home/test/cronjobs/test.sh: not found"
> I have tripe checked the file permissions and they appear correct so I
> am stumped as to why this won't run? Any ideas?

Make sure that the shebang at the top of the script (#!/bin/sh or
similar) points to a valid shell, and that it uses unix-style end of
lines. If a control character or linefeed gets in there somewhere, the
kernel won't be able to find the proper interpreter to run the script,
hence the "test.sh: '' not found."

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo at CyberLeo.Net>

Furry Peace! - http://wwww.fur.com/peace/


More information about the freebsd-questions mailing list