Hi Ozan
> Is there anyone who can make NCL run in crontab??
Disclaimer: I just tried to run NCL via cron for the first time.
> While all my other commands run normally in crontab, ncl does not,
> though it's in the same script with the other commands! When I run
> it manually, it works.
I set up a simple script to execute NCL's "system()" command to
create a zero-length file in my home directory.
> Below is my code. Directory "test" is successfully created in
> directory "otomat". The ncl script and its input file is also in
> "otomat". What I am doing wrong? (I am doing this on a Debian)
>
> #!/bin/bash
>
> NCARG_ROOT=/usr/local/ncl
> export NCARG_ROOT
> PATH=$PATH:/usr/local/ncl
> export PATH
>
> pushd /home/ozanmert/otomat
> mkdir test
> ncl sicaklikgoster.ncl
cron is somewhat notorious for not necessarily executing in a user's
expected environment. By default, cron sets:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/bin/sh
If you want your .profile executed, you must explicitly do so in the
crontab entry or in a script called by that entry.
I essentially duplicated what you're doing, but made sure my script
had full pathnames specified for the NCL binary, and the file
containing NCL commands. Doing this did work.
-Rick.
---- Rick Grubin NCAR/CISL/SCD/VETS Visualization + Enabling Technologies grubin_at_ucar.edu 303.497.1832 _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Sep 07 2006 - 16:00:53 MDT
This archive was generated by hypermail 2.2.0 : Mon Sep 11 2006 - 16:31:47 MDT