I was able to piece together an IDL program that makes some jpeg images I need. It works great when I call it from the command line (i.e., I type 'idl makejpegplots.pro').
The problem is I need to set the program to run at some point in the future, so I thought I'd use the handy unix 'at' command. For example, I can say:
echo "idl makejpegplots.pro" | at now + 2 minutes"
I run many of my scripts this way instead of using a cron.
At the given time, I know the code runs, because I get a jpeg file in my current working directory - but it's zero length! (whereas it's fine when run directly from the command line). Now, if I didn't get anything at all, I would suspect a problem with the enviroment settings - but the fact that a jpeg file is created tells me this shouldn't be the case. (If the IDL environment wasn't set, my program wouldn't have run at all). My idl code does read from a file, and I was sure to give the fully-qualified path to the file. So, I'm stumped, and unfortunately, the at command doesn't leave any trail of standard out that I can look at (despite having set the -m option to supposedly send me mail after it runs).
In my internet searches, I came across IDL_STARTUP. I don't really understand what it does - but again since the code clearly ran - I'm not sure this has anything to do with my problem. Any other suggestions??
|