On 05/09/16 15:01, da...@kosmosisland.com wrote: > I have not been able to get even a simple command to run from cron. For a > test I created this script: > > #!/bin/sh > > export PATH="/usr/bin:/usr/sbin:/root" > /bin/echo "test" > /root/test.log > > It runs from the command line but does not from cron: > > 55 11 9 * * * /root/test > > The log shows: > >> CMD: * /root/test >> root 17987 c Mon May 9 11:55:00 2016 > < root 17987 c Mon May 9 11:55:00 2016 rc=127 > > Also see: > # ls -l /root/test > -rwxr-xr-x 1 root root 85 May 9 11:57 /root/test > > > Looks like it cannot fork but /bin/sh, /bin/echo and /root/test all work > from the command line. What am I missing?
At a guess, it's saying "PATH=/usr/bin:/usr/sbin:/root: is not an identifier". Try either: PATH=/usr/bin:/usr/sbin:/root export PATH or: #!/bin/ksh -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ openindiana-discuss mailing list openindiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss