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

Peter Tribble peter.tribble at gmail.com
Mon May 9 19:19:00 UTC 2016


On Mon, May 9, 2016 at 8:01 PM, <david at 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
>

It's not the script, it's your crontab entry.

The command it's trying to run (see the CMD in the log) is

* /root/test

and, indeed, where there should be 5 time specifiers in the crontab entry
you have 6:

55 11 9 * * *

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/


More information about the openindiana-discuss mailing list