Script Works, But Not with CRON
Kenneth Brody
kenbrody at bestweb.net
Tue May 4 08:19:29 PDT 2004
Bob Stockler wrote:
>
> The following script works _perfectly_ when excuted from
> the command line, but fails when run by 'cron'.
>
> I added the statements "STATUS=${STATUS}$?" after each
> filePro command to capture the exit values of each one,
> and it returns "STATUS=101011" in email to me. That
> indicates all of the filePro commands except the "ddir"
> one are failing.
>
> No other filePro processes are running when this is run.
>
> What am I overlooking?
[...]
Get rid of the ">/dev/null 2>&1" on each line, and instead wrap the
entire command set with:
(
... current script ...
) >/tmp/output.dat 2>&1
You can then examine the output file for any error messages. (Just
remember that the output file will not be all text, but rather text
intermixed with terminal escape codes.)
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody at spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
More information about the Filepro-list
mailing list