Script Works, But Not with CRON

Bob Stockler bob at trebor.iglou.com
Tue May 4 08:44:34 PDT 2004


On Tue, May 04, 2004 at 11:19:29AM -0400, Ken Brody wrote:
| 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.)

I'll try that tonight.

Bob

-- 
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


More information about the Filepro-list mailing list