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

Home » Public Forums » archive » How to use IDL in a cronjob?
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
How to use IDL in a cronjob? [message #87719] Tue, 25 February 2014 07:35 Go to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hello,

I have a bunch of cronjobs that run various tests daily. A shell script
is invoked that does all the heavy lifting, invoking various compiled
executables.

What I would like to do is to add an additional step to my script that
invokes IDL to plot the results of those tests.

I have an IDL batch file that I can invoke at the IDL prompt that
generates the plots.

But how do I invoke that batch file at the OS prompt in a
non-interactive shell process?

Thanks for any info.

cheers,

paulv
Re: How to use IDL in a cronjob? [message #87720 is a reply to message #87719] Tue, 25 February 2014 07:41 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
In case people are wondering, my word of the day appears to be "invoke". :o\

On 02/25/14 10:35, Paul van Delst wrote:
> Hello,
>
> I have a bunch of cronjobs that run various tests daily. A shell script
> is invoked that does all the heavy lifting, invoking various compiled
> executables.
>
> What I would like to do is to add an additional step to my script that
> invokes IDL to plot the results of those tests.
>
> I have an IDL batch file that I can invoke at the IDL prompt that
> generates the plots.
>
> But how do I invoke that batch file at the OS prompt in a
> non-interactive shell process?
>
> Thanks for any info.
>
> cheers,
>
> paulv
>
>
Re: How to use IDL in a cronjob? [message #87721 is a reply to message #87720] Tue, 25 February 2014 07:47 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> In case people are wondering, my word of the day appears to be "invoke". :o\

Haha!

Dave
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: How to use IDL in a cronjob? [message #87724 is a reply to message #87719] Tue, 25 February 2014 07:58 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, February 25, 2014 4:35:31 PM UTC+1, Paul van Delst wrote:
> Hello,
>
>
>
> I have a bunch of cronjobs that run various tests daily. A shell script
>
> is invoked that does all the heavy lifting, invoking various compiled
>
> executables.
>
>
>
> What I would like to do is to add an additional step to my script that
>
> invokes IDL to plot the results of those tests.
>
>
>
> I have an IDL batch file that I can invoke at the IDL prompt that
>
> generates the plots.
>
>
>
> But how do I invoke that batch file at the OS prompt in a
>
> non-interactive shell process?
>
>
>
> Thanks for any info.
>
>
>
> cheers,
>
>
>
> paulv

Not sure if this is what you need, but what I do is use the idl virtual machine (I think !).
You have to locate the file idlrt.exe in you idl distribution and then use it like this (on windows!):
c:\>"c:\Program Files\Exelis\...\idlrt.exe" d:\MySoft\testfile.sav

Of course you need to make a sav file before hand.
Also, I'm not sure how this would look like on linux, but I just guess you need an extra ./ before the executable.

Hope it helps.

Invokingly yours,
Helder
Re: How to use IDL in a cronjob? [message #87726 is a reply to message #87719] Tue, 25 February 2014 08:02 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den tisdagen den 25:e februari 2014 kl. 16:35:31 UTC+1 skrev Paul van Delst:
> Hello,
>
> I have a bunch of cronjobs that run various tests daily. A shell script
> is invoked that does all the heavy lifting, invoking various compiled
> executables.
>
> What I would like to do is to add an additional step to my script that
> invokes IDL to plot the results of those tests.
>
> I have an IDL batch file that I can invoke at the IDL prompt that
> generates the plots.
>
> But how do I invoke that batch file at the OS prompt in a
> non-interactive shell process?

Put the commands you would give at the IDL prompt (like, .run batch.pro) in a file (say, promptcommands.pro). Then you can run it from the shell like this:

$ idl < promptcommands.pro
Re: How to use IDL in a cronjob? [message #87727 is a reply to message #87726] Tue, 25 February 2014 08:04 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den tisdagen den 25:e februari 2014 kl. 17:02:38 UTC+1 skrev Mats Löfdahl:
>
> Then you can run it from the shell like this:

Sorry, I meant that you can invoke it like that.
Re: How to use IDL in a cronjob? [message #87731 is a reply to message #87727] Tue, 25 February 2014 08:18 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 02/25/14 11:04, Mats Löfdahl wrote:
> Den tisdagen den 25:e februari 2014 kl. 17:02:38 UTC+1 skrev Mats Löfdahl:
>>
>> Then you can run it from the shell like this:
>
> Sorry, I meant that you can invoke it like that.

Excuse me while I clean up the coffee that squirted out my nose... :o) Ha!

But, back to my question, your suggestion worked. I did

$ idl my_batch_file.pro

and I got all the PNG plots created. Excellent. Thanks.

So simple! I spent about 15 minutes looking through the help and did not
see that described (not saying it's not there, just I couldn't easily
find it).


Effectuatingly Yours,

paulv
Re: How to use IDL in a cronjob? [message #87737 is a reply to message #87731] Tue, 25 February 2014 12:45 Go to previous messageGo to next message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> So simple! I spent about 15 minutes looking through the help and did not
> see that described (not saying it's not there, just I couldn't easily
> find it).

Check out the "-e" option at the command line. Can save an intermediate step

http://www.exelisvis.com/docs/Command_Line_Options_for.html
Re: How to use IDL in a cronjob? [message #87743 is a reply to message #87737] Tue, 25 February 2014 14:22 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Cool! I also notice a "-batch" switch. I'll have to try it. (why can't
*I* find all this useful stuff when I search for it?! Grrr argghh)

My cronjob ran and the IDL plots were produced and squirted onto an ftp
server so invoking IDL sans switches does do the job - but it may rely
on something in my environment. Pudding-proof comes when I move the
whole shebang onto the supa-computers.

Thanks,

paulv

On 02/25/14 15:45, Matthew Argall wrote:
>> So simple! I spent about 15 minutes looking through the help and did not
>> see that described (not saying it's not there, just I couldn't easily
>> find it).
>
> Check out the "-e" option at the command line. Can save an intermediate step
>
> http://www.exelisvis.com/docs/Command_Line_Options_for.html
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Segfault opening graphics window
Next Topic: Using a text list to populate a LIST() in IDL

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

Current Time: Wed Oct 08 11:44:20 PDT 2025

Total time taken to generate the page: 0.00601 seconds