Cron job for a Java Program

前端 未结 4 860
渐次进展
渐次进展 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条回答
  •  旧时难觅i
    2020-12-05 23:11

    • Write a shell script to invoke your java program with the necessary arguments.
    • Make sure that the classpath argument points to the jars that you need.
    • Make sure that the shell script has necessary unix permissions.
    • Schedule the script to be invoked by setting up a cron job.

    For more info about cronjob look here http://en.wikipedia.org/wiki/Cron

    just my 2 cents...

提交回复
热议问题