I guess I'm clueless here ... why would you need to add anything
to your PATH to make a cron job work? What's incorrect about the
following:
The default path that cron uses is in 10.4 is "/usr/bin:/bin",
which is fine for some cron entries - until you try to use a
command like "chown" that lives somewhere else . (chown is in /
usr/sbin.)
In my case it wasn't there (on an fresh install of Tiger).
But on my system (client) here, there's no default path either (while
there is on Panther systems):
styx:~ cronos$ cat /etc/crontab
# The periodic and atrun jobs have moved to launchd jobs
# See /System/Library/LaunchDaemons
#
# minute hour mday month wday who command
styx:~ cronos$
You can either spell out the full path to everything, or set the
PATH variable in the crontab itself to include a few more folders.
Spelling out is best practice, I absolutely agree with this.
I think I had a line running every minute, something alike
echo "cron is running" > /Macintosh\ HD/Users/admin/testcron.txt
as echo is a built-in I didn't think I'd have to add the path to it,
and I feel I still don't understand it fully:
a quick look at
man builtin
shows:
Thus, while
specifying ``echo'' causes a builtin command to be executed
under shells
that support the builtin echo command, specifying ``/bin/echo'' or
``./echo'' does not.
Does that mean I need to set a shell environment table (SHELL=/bin/
bash - as described in man 5 crontab), before cron can execute built-
ins?
I have it running for my needs, but still I'd be glad if you could
help me understand this matter.
Regards
Gregor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden