Cron job for a Java Program

前端 未结 4 861
渐次进展
渐次进展 2020-12-05 22:19

I am using a java program which sends email after finishing up some file transfers.I am using Eclipse to code up the program. How do I set up a cron job to execute this java

4条回答
  •  广开言路
    2020-12-05 23:02

    There is the cron4j library http://www.sauronsoftware.it/projects/cron4j/. I have used it before to schedule a java program to run weekly. The scheduling syntax is the same as a crontab. The thing is, it needs to be constantly running as a background process to work. I ended up just using normal cron, but it could be useful if you're not on an Unix-like system, and you don't have cron.

提交回复
热议问题