IMPORTANT: Make sure ' Wake the computer to run this task' is selected. Specify how often you want the task to be executed (e.g. java -cp )Ĭreate a Windows Scheduled Task (or Cron Job in Linux).
bat script that will call your program from command line (e.g. Basically refactor your program so that it executes a single task at a time.Ĭreate a simple Windows. Just execute once and let the program complete. In other words, if you have a while loop looping, then waiting N minutes, don't do that. Make your Java program executes just one unit of work.