Java scheduler

We would like to schedule a job within the prog using a java APIs rather than the windows scheduler. Currently the Timer class in java enables us to schedule a job at regular intervals , but what I am looking for is to schedule a job at a particular time . like it should start everyday at 8 AM , please advice .
FranklinRaj22Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ErdyMurphyCommented:
0
CEHJCommented:
>>using a java APIs rather than the windows scheduler.

That's not a particularly good idea: unless you run the java app as a service, you'll find it all too easily shut down accidentally. An unreliable scheduler is useless
0
ErdyMurphyCommented:

public void scheduleAtFixedRate(TimerTask task, long delay,long period)
pherhaps you could start at 8 pm and set teh period for 24h
0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Dejan PažinHead of SW DevelopmentCommented:

We are using Quartz for our job scheduling:

http://www.quartz-scheduler.org/

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
>>We would like to schedule a job within the prog using a java APIs rather than the windows scheduler.

What are your reasons for that incidentally? I can understand if you want to be independent from the OS, but unfortunately, if you want safety and reliability, you can't be. You need a service

http://commons.apache.org/daemon/procrun.html
or
http://wrapper.tanukisoftware.com/
0
Amitkumar PSr. ConsultantCommented:
FranklinRaj22,

Follow dejanpazin and have look into Quartz schedular API. I've worked with and found it is very good from the result point of view as well as implementation point of view.
0
CEHJCommented:
Quartz is generally a good idea, but doesn't solve the problem: it generally runs in the context of a web application. Your use case sounds like a client-side one. If that's the case, Quartz itself would need to run as a Windows service.

Since you already have a windows scheduling service running, it seems a shame not to use it
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.