I'm having issues getting a cron tab to run a java file every 5 minutes.
I have tried to create an executable script to see if that is what's needed:
My script and java file are both stored in
/usr/local/bin and this is what I have in my crontab:
*/5 * * * * /usr/local/bin/java-crontab.sh
This is what I have in my script
#!/bin/bash JAVA_HOME=usr/java/jdk1.6.0_40 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH java -jar /usr/local/bin/javatest.jar
Sorry update - my JAVA_HOME file is not stored in usr/java but in usr/share/doc/openjdk-6-jre-headless. However when I enter that path in the executable script file I don't have permission to do so.
Brand new to creating VM's so apologies for my utter confusion here!