Answer the question
In order to leave comments, you need to log in
How to check if the CRON scheduler is working?
Hello comrades! Please help me figure it out. Faced with strangeness and I can not understand at what stage the error occurred.
In the directory I have 2 files:
- application.jar
- application.sh
crontab -l
* */1 * * * /path/application.sh
Answer the question
In order to leave comments, you need to log in
Solved the problem. The problem was with the rights. In the .sh file itself, the path to the .jar file was specified correctly. Added logging now, it became easier:
By the way, I found the cron file in the /var/log/ directory . It contains information about the launches of the scheduler.
The problem must be looked for in the logs.
Log as much as possible in the jar, from launch to output.
if everything is OK with the rights, then I suspect that in application.sh you need to specify
# path to application .jar
cd /path/
and further in the text
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question