How to schedule a java program to run Every day?

For Linux, have a look at cron jobs.

First, install your cronjob by running the following command:

# crontab -e

To run a job everyday 5 minutes after midnight, append the following:

5 0 * * * /path/to/command

Save and close the file.

For Windows, have a look at scheduled tasks.


For linux you can use cron and to do the same thing on windows use quartz-scheduler.

Take a look here for crontab-examples.


you can use Quartz API to Schedule your daily/On-Time Jobs. Following is the link for Quartz API: http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/