[ncl-talk] execute a ncl script in crontab [SEC=UNCLASSIFIED]
Griffith Young
griffith.young at bom.gov.au
Mon Nov 14 16:58:17 MST 2016
I realise that this has been answered already, but I typed it and I may as well share it.
When you run a command from cron, you will have basic "sh" shell.
When you run from the terminal, you will have "bash" and you will probably have called .bashrc and .bash_profile. These will have added to you PATH environment variable and other environment variables that NCL uses.
Often the simplest work-around is to create a script just for cron to call that will "source" your .bashrc (possible, but not recommended), or that sets the important environment variables for you (PATH,
NCL_ROOT, NCARG_ROOT, ...)
Another reason that your script may not work is that you start in your home directory when you run from cron.
Happy hunting.
Regards, Griff.
Griffith Young | SITOC
Research and Development Branch
Bureau of Meteorology
GPO Box 1289 Melbourne VIC 3001
Level 9, 700 Collins Street, Docklands VIC 3008
Tel: +61 3 9616 8381 | G.Young at bom.gov.au
www.bom.gov.au - cawcr.gov.au - poama.bom.gov.au
________________________________________
Message: 1
Date: Sun, 13 Nov 2016 13:54:16 +0000
From: "Agud Pique, Enric" <eagud.q at ccma.cat>
Subject: [ncl-talk] execute a ncl script in crontab
To: "'ncl-talk at ucar.edu'" <ncl-talk at ucar.edu>
Message-ID:
<833FB00B9189B840B8857DCDBAD128D30141D97A9F at MAILBOX-3.ad-ccrtv.local>
Content-Type: text/plain; charset="us-ascii"
Dear people,
I execute a ncl file by terminal, (ncl filename.ncl) but when I launch it by crontab it doesn't run...crontab ignores it. I use bash script in crontab without problems...
Thank you in advance
More information about the ncl-talk
mailing list