Fw : Running Grads automatically with crontab
Ryo Furue
furue at HAWAII.EDU
Tue Nov 25 17:23:29 EST 2008
Hi Mariane,
| I'm plotting lots of figures with grads. I have a script that runs
| fine automatically, but fails when I set it with crontab.
| Below is the error message
| Error in GXSTRT: Unable to connect to Xserver.
This error means that the cron job doesn't know which
display (screen) to use.
First of all, do you want to draw something on the
computer's screen? If not, you can simply use
the "-b" option of GrADS to instruct GrADS not to
access any screen. (I think.)
If, on the other hand, you want to draw something on
the screen, you would need to take care of screen access.
I'm not sure whether the following works, but . . .
At the very least, you would need to set the
DISPLAY environment variable in your crontab, as
DISPLAY=:0.0
. . . . . . .
23 4 * * * grads -c . . . .
You may also need to get the authorization of your access:
DISPLAY=:0.0
. . . . . . .
23 4 * * * xauth merge /home/yourhomedir/.Xauthority; grads -c . . . .
if you are both the owner of the cron job and the owner of the
display.
Regards,
Ryo
More information about the gradsusr
mailing list