im running this on 14.04.1-Ubuntu
Linux matlabrun 3.19.0-56-generic #62~14.04.1-Ubuntu SMP Fri Mar 11 11:03:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
using java version:
java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
So I have two elements in my cron testrun and delme.jar.
PATH=/usr/bin/java:/usr/bin/javac:/usr/lib/jvm/java-7-oracle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v85/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v85/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v85/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/$
XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Runtime/v85/X11/app-defaults:/usr/local/MATLAB/MATLAB_Runtime/v90/X11/app-defaults
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
5,10,15,20,30,35,40,43,45,50,52,55,58 * * * 0,1,2,3,4,5,6 /home/meh/model/TestModelABC/testrun > /home/meh/model/TestModelABC/testrun.log
5,10,13,15,17,18,20,25,30,33,35,36,40,43,45,50,52,55,58 * * * 0,1,2,3,4,5,6 java -jar /home/meh/model/TestModelABC/delme.jar > /home/meh/model/TestModelABC/del.log
testrun is a bash script that calls java code as so:
#!/bin/sh
java -jar delme.jar
This doesn’t work. It also doesn't work when i call the file directly via the java -jar delme.jar from within crontab.
I know the cron is running its just not executing the java.
To that end i have as you can see put in the path's to the crontab as well as have tried to put the path into the bash script like so:
PATH=/usr/bin/java:/usr/bin/javac:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v85/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v85/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v85/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/sys/os/glnxa64:
XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Runtime/v85/X11/app-defaults:/usr/local/MATLAB/MATLAB_Runtime/v90/X11/app-defaults
echo "Forecast Test"
I am really stuck now as im out of things to try. Any ideas? My gut is telling me it is a PATH issue but I don't know what’s left to try.