Cronjob在Linux中没有运行JAR文件
我在Linux中有一个Java Jar文件。我创建了一个脚本来运行该JAR文件。当我手动运行脚本时,运行良好。
但是,当我安排cronjob运行脚本时,它不起作用。
以下是我在下面安排的Cronjob
11 10 * * * /home/sub/model.sh >> /home/sub/model.log
是Shell脚本。
#!/bin/bash
/usr/bin/java -jar /home/sub/myprogram.jar
任何人,请帮助我解决这个问题。我不知道我错过了什么
I have one java jar file in linux. I have created one script to run that jar file. When I run the script manually, it is running fine.
But when I schedule the cronjob to run the script,it doesn't work.
Below is the cronjob which I scheduled
11 10 * * * /home/sub/model.sh >> /home/sub/model.log
Below is the shell script.
#!/bin/bash
/usr/bin/java -jar /home/sub/myprogram.jar
Anyone please help me to solve this issue. I don't know what I missed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论