File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes windows task schedular programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "windows task schedular programming" Watch "windows task schedular programming" New topic

windows task schedular programming

Shankar Arumugam

Joined: Oct 05, 2005
Posts: 14

I want to use the Windows Task Sheduler to run a method every 1 hour. I
am new to java programming world.So help me out to schedule it using the task scheduler.If possible give me some sample code also.
Ramya Chowdary
Ranch Hand

Joined: Sep 27, 2006
Posts: 252
You can do that with timers...
But,that logic can be simply implemented like

Spawn a thread , call the method depending upon your condition( simply infinite times)

Kumar Naveen

Joined: Jul 07, 2008
Posts: 1

if you want to run the task for every one hour in windows,do like this


in that control pannel we have a folder like scedular task
click on that folder and the addschedular task
and click on next button

follow the steps from there

i think i gave some what answer
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

If you want to create a windows service programatically then Java service wrapper will come to your help.

This is a nice article on using Java service wrapper.

apigee, a better way to API!
Ramya Chowdary
Ranch Hand

Joined: Sep 27, 2006
Posts: 252
Be Clear When you asking Question.

I think it is Windows Task Scheduler starting a Application rather than method.

Anyway,Java is not suited when you writing windows services and calling lots of Win32 API or any native calls.
[ July 16, 2008: Message edited by: Pratap koritala ]
I agree. Here's the link:
subject: windows task schedular programming
It's not a secret anymore!