Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a shell script that I want to schedule via cron to be ran every 10 minutes. The shellscript runs a jar file.

If i run the shellscript via ./sensorrreader.sh it works just fine (creates a file)

But when I schedule the job in cron it runs but no file is created, so something goes wrong... any suggestions what might be the error? (In simple words please, im learning linux/unix commands :-) )

This is the contents of the sensorreader.sh file:

#! /bin/sh
source /ffp/etc/profile.d
export JAVA_HOME=/ffp/opt/java/jre/bin/java
export PATH=$PATH:/ffp/opt/java/jre/bin
/ffp/opt/java/jre/bin/java -jar /mnt/HD/HD_a2/Nigge/SensorReader/SensorReader.jar 

and this is the row in crontab:

*/10 * * * * /mnt/HD/HD_a2/Nigge/SensorReader/sensorreader.sh

Any suggestions what might be wrong?

share|improve this question
Where should the file be created? –  MadMike Jan 31 '14 at 9:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.