I am having no problems running a jython script from a cron
The call in the cron is:
Code: Select all
sh /home/user/mcidas/scripts/runJython.sh /home/user/mcidas/scripts/reportAreaDiag.py -gEASTL -dCONUS
where runJython.sh contains
Code: Select all
#!/usr/bin/sh
# set the environment
. $HOME/.bashrc
cd $HOME/mcidas/scripts/
java -mx3000m -Dj3d.debug=true -Dpython.home=${hh} -cp ${CLASSPATH} org.python.util.jython $1 $2 $3 $4 $5 $6 $7
and in my .bashrc
Code: Select all
export mcvsys=$HOME/McIDAS-V-System
export mcvdoc=$HOME/McIDAS-V
export hh=${mcvdoc}/jython2.5.2
export mcvscr=$HOME/mcidas/scripts
export CLASSPATH=${mcvsys}/visad.jar:${mcvsys}/external.jar:${mcvsys}/jython.jar:${mcvsys}/commons-math-2.2.jar:${mcvsys}/mcidasv.jar
However, I have not figured out how nohup a series of jython scripts, or run them sequentially from a cron.
Right now, I can run in the foreground a file which contains the following lines.
Code: Select all
java -mx3000m -Dj3d.debug=true -Dpython.home=${hh} -cp ${CLASSPATH} org.python.util.jython /home/user/mcidas/scripts/reportAreaDiagTimeSpecGeoArc.py -g AGOES13 -d CONUS -t 2:45:00 -p 2:32:00 -j 2013072 -k 2013072
java -mx3000m -Dj3d.debug=true -Dpython.home=${hh} -cp ${CLASSPATH} org.python.util.jython /home/user/mcidas/scripts/reportAreaDiagTimeSpecGeoArc.py -g AGOES13 -d CONUS -t 3:15:00 -p 2:45:00 -j 2013072 -k 2013072
java -mx3000m -Dj3d.debug=true -Dpython.home=${hh} -cp ${CLASSPATH} org.python.util.jython /home/user/mcidas/scripts/reportAreaDiagTimeSpecGeoArc.py -g AGOES13 -d CONUS -t 3:32:00 -p 3:15:00 -j 2013072 -k 2013072
I cannot run in background or with a nohup. Is there a way to do this?
Joleen