I have a .sh script that runs a python script that runs a jarfile. I want to run it from crontab. I created a log for the crontab and I get this error: Error: Unable to access jarfile ArhivareProd.jar This is the line that runs the jar file: os.system("java -jar ArhivareProd.jar &")

What can I do to run it from crontab without error ?


  • Have you tried java -jar /absolute/path/to/archive.jar ? – Haxiel Sep 30 at 12:50

Check the permission for the jar file It needs read and executable permission to the crontab user

Sometimes permission not needed when running manually, but needed for Cron.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.