Crontab cannot run jar file

By running:

00 01 * * 1 root /usr/bin/java -jar /home/export/export.jar

Exit: the scheduler will not be able to wake up.

Then I changed it to:

00 01 * * 1 root /usr/bin/java -jar /home/export/export.jar > /home/export/cron.log 2>&1

It worked!

Can I do this without exporting to a file - cron.log?
I used log4j to register the process; cron.logis a duplicate for me.

+4
source share
1 answer

You can replace with / dev / null, as in:

00 01 * * 1 root /usr/bin/java -jar /home/export/export.jar > /dev/null 2>&1
+1
source

All Articles