• Post Reply Bookmark Topic Watch Topic
  • New Topic

running Timer on weekdays?  RSS feed

 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to create a Timer which runs on every weekday(mon-fri) at 9:30AM, 9:54AM, 3:31PM, 3:49PM, 4:01PM.

how do i achieve this?

or if any one can provide me any third-party classes which can run be configured like windows Task Scheduler (such as task can be run daily, weekly, monthly at any specific time)
 
Paul Clapham
Sheriff
Posts: 22708
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read about the features of Quartz here and see if they are suitable for you.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written several batch processes that run on week days within specific time limits by simply using the GregorianCalendar class. Get the current time. Then get the time you want it to run from a properties file or something. Compare the current time and check if it lies within the range specified. If it does then execute else loop.
 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks john for your reply.
can you please share your code with me, i simply have no time to write the my own code. please mail at hasankemail-1@yahoo.com
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!