[OpenIndiana-discuss] command will not run from cron but will from CLI

david at kosmosisland.com david at kosmosisland.com
Mon May 9 19:01:49 UTC 2016


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?

Regards,
David Koski





More information about the openindiana-discuss mailing list