im dies auf 14.04.1-UbuntuJava Cron und epische nicht
Linux matlabrun 3.19.0-56-generic Lauf # 62 ~ 14.04.1-Ubuntu SMP Fr 11. März 11.03.15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
mit Java-Version:
java version "1.7.0_80" Java (TM) SE Runtime Environment Java HotSpot ( 1.7.0_80-b15 bauen) (TM) 64-Bit Server VM (build d 24,80-b11, mixed mode)
So habe ich zwei Elemente in meinem cron Testlauf und 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
Testfahrt ist ein Bash-Skript, das als so Java-Code ruft:
#!/bin/sh
java -jar delme.jar
Dies funktioniert nicht. Es funktioniert auch nicht, wenn ich die Datei direkt über die java -jar delme.jar innerhalb von crontab aufruft.
Ich weiß, dass der Cron gerade läuft, nicht das Ausführen des Java.
Zu diesem Zweck habe ich, wie Sie auch auf dem Weg ist, um die crontab gestellt sehen, wie versucht haben, wie so den Weg in die Bash-Skript zu setzen:
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"
ich jetzt wirklich wie im stecke aus Dinge zu versuchen. Irgendwelche Ideen? Mein Bauchgefühl sagt mir, dass es ein PATH-Problem ist, aber ich weiß nicht, was noch zu versuchen ist.
Was schreibt der Job an stderr? –
Wo soll 'testrun'' delme.jar' finden? Wie soll es wissen, wo es lebt? –