Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scheduling java program

 
Geetha Gubendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand your question. Why do you only want to schedule something in Windows and not in Unix?
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can check out the stuff in java.util.concurrent.*
Specifically ScheduledThreadPoolExecutor might be of interest to you.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Geetha Gubendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed is correct. I asked about the execution of java program.

Thanks and Regards,
Geetha
 
Jason Cone
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Geetha Gubendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much jason
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic