Link to home
Start Free TrialLog in
Avatar of keepworking
keepworking

asked on

schedule a job

in a web application, I need call a method in a certain period, for example, I need run a method every 10 mins, how to do it?

thanks
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could create a timer similar to the one found on this page:
http://www.javakb.com/Uwe/Forum.aspx/java-programmer/4638/Java-Timer
Avatar of keepworking
keepworking

ASKER

can I code a method to run a shceduled job, instead of your reply above?

thanks
CRON???
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
for a simple implementation you could use a Timer

http://javaalmanac.com/egs/java.util/ScheduleRepeat.html

Have a servlet start the timer on startup
ok, I will try to use a timer and reply soon

thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial