[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running IDL from cron



Vapuser <vapuser@catspaw.jpl.nasa.gov> writes:

>  Cron uses a crippled environment in the Bourne shell, it defines
>  only a limited number of environmental variables. 

I've been able to use a fully functional C shell in my cron jobs, by the simple
expedient of explicitly telling it what shell to run.  This is done by putting

	#!/bin/csh

as the first line of the script.  For example, the extremely simple script

	#!/bin/csh
	printenv

when run as a cron job, demonstrates that my .cshrc file is being automatically
executed.  On the other hand, my .login file is not.  To do that, I would have
to use

	#!/bin/csh
	source .login
	printenv

which works, although I do get a "not a terminal" error.  For myself, it's not
necessary to run .login--all setup is done in .cshrc.

A valid C-shell script to run IDL would be

	#!/bin/csh
	idl << done
	print,'Hello world'
	done

I do have a cron job which uses IDL in just this fashion, which nightly creates
some images for a web page.  As somebody has already pointed out before me, the
way to do this in a cron job is to use the Z buffer.

William Thompson