Re: ncl in crontab ???

From: Rick Grubin <grubin_at_nyahnyahspammersnyahnyah>
Date: Fri, 8 Sep 2006 08:44:27 -0600

NCL-talkers,

A followup to let everyone know that the suggestions made to Ozan
regarding having NCL run as a job from cron worked for him.

> From: ozan mert gokturk <gokturko_at_itu.edu.tr>
> Date: September 8, 2006 2:16:50 AM MDT
>
> I really thank you for your answer. I simply added /bin to the ncl
> path, and it worked!

> Quoting Rick Grubin <grubin_at_ucar.edu>:
>
>> 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-talk
Received on Fri Sep 08 2006 - 08:44:27 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 11 2006 - 16:31:47 MDT