Project

General

Profile

Execution problems

Added by Álvaro Labella about 12 years ago

Hi, i'm trying to use CDO software, inttime function in particular, as a part of a bash script in Linux. When I am logged as a my particular user in Linux and I execute the script, inttime function is OK and interpolate my data but when I try to execute the script in crontab (actually, it's root who executes the script when it's in crontab) I get inttime doesn't work...

Any idea of why inttime doesn't interpolate when it's executed in crontab?

Thank u in advance


Replies (3)

RE: Execution problems - Added by Ralf Mueller about 12 years ago

A log file your session and of the failing cronjob would be helpful.

RE: Execution problems - Added by Jaime Lopez over 11 years ago

Hi,
I'm facing the same problem, when executing a csh script with cdo commands, it works. When I try to launch the same script from the crontab, cdo is not working. In the log file, nothing is repported, it seems like the script coudn't see the cdo commands lines.
I've make this simple example to be sure that it is a CDO issue:

#!/bin/csh
set dire='/home/user'
cd $dire
echo $PATH
which cdo
cdo -h inttime > $dire/kkk

I've check the PATH variable and execution permissions, and I've also tried different CDO versions (1.5.6, 1.5.8 and 1.5.9).
I enclose my cdo -V result:
Climate Data Operators version 1.5.9rc3 (http://code.zmaw.de/projects/cdo)
Compiler: gcc -std=gnu99 -g -O2 -pthread
 version: gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
    with: PTHREADS NC4 Z
Compiled: by root on simoserver (x86_64-unknown-linux-gnu) Nov 23 2012 11:09:54
     CDI library version : 1.5.9 of Nov 23 2012 11:09:48
 CGRIBEX library version : 1.5.5 of Sep 10 2012 14:09:44
  netCDF library version : 4.1.3 of Nov 20 2012 13:06:49 $
    HDF5 library version : 1.8.9
 SERVICE library version : 1.3.1 of Nov 23 2012 11:09:39
   EXTRA library version : 1.3.1 of Nov 23 2012 11:09:34
     IEG library version : 1.3.1 of Nov 23 2012 11:09:36
    FILE library version : 1.8.1 of Nov 23 2012 11:09:34

Can you help me please???

RE: Execution problems - Added by Ralf Mueller over 11 years ago

From my experience, it is always better to use absolute paths for crontab-related stuff. re-write the calls with an absolute path, could be something like

cdo=/home/user/bin/cdo
and than replace all occurrences of cdo with $cdo.

    (1-3/3)