wood burning stoves 2.0*
The moose likes Java in General and the fly likes scheduling java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "scheduling java program" Watch "scheduling java program" New topic
Author

scheduling java program

Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
I want to schedule a java program. I would like to know what are the various options to run the java program. I dont want to use windows batch file. I was looking into quartz scheduler and timertask class. There are ways to schedule it but how would you run it (automatically triggered at that particular time) in Windows and not in UNIX?

Thanks and Regards,
Geetha
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I don't understand your question. Why do you only want to schedule something in Windows and not in Unix?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Alex Hurtt
Ranch Hand

Joined: Oct 26, 2010
Posts: 98
You can check out the stuff in java.util.concurrent.*
Specifically ScheduledThreadPoolExecutor might be of interest to you.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Alex Hurtt wrote:You can check out the stuff in java.util.concurrent.*
Specifically ScheduledThreadPoolExecutor might be of interest to you.

I think Raj meant to schedule the execution of Java program on Windows- like on Unix we use cron jobs.


Mohamed Sanaulla | My Blog
Alex Hurtt
Ranch Hand

Joined: Oct 26, 2010
Posts: 98
mohamed sanaullah wrote:
Alex Hurtt wrote:You can check out the stuff in java.util.concurrent.*
Specifically ScheduledThreadPoolExecutor might be of interest to you.

I think Raj meant to schedule the execution of Java program on Windows- like on Unix we use cron jobs.


Well if that's the case, there's always Start -> Programs -> Accessories -> System Tools -> Scheduled Tasks
This is the closest thing I can think of under Windows (I'm using XP) to the cron tool.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4572
    
    5

It's the same StartMenu path under Win7, only "Scheduled Tasks" has been renamed to "Task Scheduler"

Also, it's somewhat unnerving that "Raj Shan" should sign off as "Geetha"


luck, db
There are no new questions, but there may be new answers.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39076
    
  23
Darryl Burke wrote: . . . it's somewhat unnerving that "Raj Shan" should sign off as "Geetha"
Agree. I shall have to send whoever a private message.
Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
Mohamed is correct. I asked about the execution of java program.

Thanks and Regards,
Geetha
Jason Cone
Greenhorn

Joined: Jul 21, 2004
Posts: 25
Yeah, Windows Task Scheduler is the standard "cron" for Windows.

Another option on Windows would be to write the scheduling in Java and then wrap it up as a Java Windows Service. Once it's installed as a Windows Service, you can configure it to run on startup (even when no one is logged in), just like any other Windows Service.
Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
Thank you so much jason
 
GeeCON Prague 2014
 
subject: scheduling java program