Re: idl -quiet command-line option doesn't work in cron [message #67434 is a reply to message #67413] |
Thu, 23 July 2009 11:34  |
Bringfried Stecklum
Messages: 75 Registered: January 1996
|
Member |
|
|
Ed Hyer wrote:
> I created a save file 'routine.sav', and am running it in cron, like
> this:
>
> idl -quiet -queue -rt=routine.sav > log.txt
>
> So, in Linux terms, STDOUT is sent to log.txt, and STDERR goes into an
> email to me from the system. I like this, because I have a quick place
> to check if anything went wrong.
>
> The reason for -quiet is to suppress the startup message, which goes
> to STDERR when you start IDL:
>
> IDL Version 7.0.6 (linux x86_64 m64). (c) 2008, ITT Visual Information
> Solutions Installation number:.
>
> This works from the command line, but when I put it into cron, I still
> get the message, sent to me in an email from cron.
>
> Any ideas?
>
>
You have to redirect the output in /etc/crontab, like
# m h dom mon dow user command
25 6 * * * hyer idl -quiet -queue -rt=routine.sav &> /dev/null
to avoid any message being sent to you. If you still want stderr to be mailed
just use 1> /dev/null.
Regards, Bringfried
|
|
|