comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » running idl from a cron job
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
running idl from a cron job [message #58426] Fri, 01 February 2008 09:19 Go to next message
rlayberry is currently offline  rlayberry
Messages: 33
Registered: November 2004
Member
hi

can someone give me a link to show how to run an idl peice of code
from a unix shell script

thanks

russ
Re: running idl from a cron job [message #58545 is a reply to message #58426] Sat, 02 February 2008 10:25 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
rlayberry@hotmail.com wrote:
> hi
>
> can someone give me a link to show how to run an idl peice of code
> from a unix shell script
>

This thread might be relevant:

http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/b1707d617132fd18

Cheers,
Benjamin
Re: running idl from a cron job [message #58557 is a reply to message #58426] Fri, 01 February 2008 14:26 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Feb 1, 10:19 am, rlaybe...@hotmail.com wrote:
> can someone give me a link to show how to run an idl peice of code
> from a unix shell script

http://idlastro.gsfc.nasa.gov/idl_html_help/Command_Line_Opt ions_for_IDL_Startup.html

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
Re: running idl from a cron job [message #58562 is a reply to message #58426] Fri, 01 February 2008 11:36 Go to previous messageGo to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Well, here's how I do it (there may be other ways tough).

Define a shell script doing two things:

- set up an IDL_STARTUP environmental variable with the full path to a
valid
IDL program (let's say is called idl_startup.pro)
- start idl

Then, in idl_startup.pro put in

[your initialization for IDL]

your_program

exit
end

This way, you can put the shell script in your cron table,
and this will execute your IDL initializations, then
the program called your_program and exit IDL when
your_program is finished.

Ciao,
Paolo


rlaybe...@hotmail.com wrote:
> hi
>
> can someone give me a link to show how to run an idl peice of code
> from a unix shell script
>
> thanks
>
> russ
Re: running idl from a cron job [message #59075 is a reply to message #58426] Thu, 06 March 2008 01:37 Go to previous message
rlayberry is currently offline  rlayberry
Messages: 33
Registered: November 2004
Member
On 5 Mar, 15:43, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Mar 5, 7:44 am, rlaybe...@hotmail.com wrote:
>
>> Thanks for this.  I had a play with it and what i do now is just put
>
>> idl -IDL_STARTUP myfile
>
>> in the shell script called from the cron job
>
>> and myfile is the batchfile which is run
>
> You can do that without the using the startup option:
>
>   $ idl myfile
>
> will run the myfile.pro batch file (put an exit at the end if you want
> IDL to quit at the end). You can also execute an arbitrary command:
>
>   $ idl -e "surface, hanning(20, 20)"
>
> Full options are described in the online help here:
>
> http://idlastro.gsfc.nasa.gov/idl_html_help/Command_Line_Opt ions_for_...

Thanks Mike, that's better.
Re: running idl from a cron job [message #59091 is a reply to message #58426] Wed, 05 March 2008 07:43 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Mar 5, 7:44 am, rlaybe...@hotmail.com wrote:
> Thanks for this.  I had a play with it and what i do now is just put
>
> idl -IDL_STARTUP myfile
>
> in the shell script called from the cron job
>
> and myfile is the batchfile which is run

You can do that without the using the startup option:

$ idl myfile

will run the myfile.pro batch file (put an exit at the end if you want
IDL to quit at the end). You can also execute an arbitrary command:

$ idl -e "surface, hanning(20, 20)"

Full options are described in the online help here:

http://idlastro.gsfc.nasa.gov/idl_html_help/Command_Line_Opt ions_for_IDL_Startup.html

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
Re: running idl from a cron job [message #59097 is a reply to message #58562] Wed, 05 March 2008 06:44 Go to previous message
rlayberry is currently offline  rlayberry
Messages: 33
Registered: November 2004
Member
On 1 Feb, 19:36, pgri...@gmail.com wrote:
> Well, here's how I do it (there may be other ways tough).
>
> Define a shell script doing two things:
>
> - set up an IDL_STARTUP environmental variable with the full path to a
> valid
> IDL program (let's say is called idl_startup.pro)
> - start idl
>
> Then, in idl_startup.pro put in
>
> [your initialization for IDL]
>
> your_program
>
> exit
> end
>
> This way, you can put the shell script in your cron table,
> and this will execute your IDL initializations, then
> the program called your_program and exit IDL when
> your_program is finished.
>
> Ciao,
> Paolo
>
>
>
> rlaybe...@hotmail.com wrote:
>> hi
>
>> can someone give me a link to show how to run an idl peice of code
>> from a unix shell script
>
>> thanks
>
>> russ- Hide quoted text -

Hi

Thanks for this. I had a play with it and what i do now is just put

idl -IDL_STARTUP myfile

in the shell script called from the cron job

and myfile is the batchfile which is run

russ
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Confluent Hypergeometric Function of the First Kind
Next Topic: unix like endline in workbench

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 12:28:25 PDT 2025

Total time taken to generate the page: 0.07948 seconds