0

I have got a requirement to run a function at specific time of particular day.This time and day at which the function needs to be executed will be provided by the user.The function which needs to be executed generates the pdf file at specific location of the machine.

I new Timer class of java can schedule to run a function at specific time but i have never used it..

Please help me as how to set timer to run a function a specific time of the day..

Thanks in advance..

Adi
  • 1,395
  • 11
  • 37
  • 61
  • 1
    Will the Java program constantly be running? Because in most cases setting something to start the program at specific times would be a better choice; in Windows this would be a scheduled task, in Linux/UNIX you would have a cronjob. – blalasaadri Nov 09 '13 at 14:53
  • Please stick to your original question http://stackoverflow.com/questions/19875402/how-to-execute-function-automatically-at-specified-time-in-java – arkonautom Nov 09 '13 at 14:56
  • @blalasaadri sir actually i am also new to this.but in my case it is web application and it is deployed on apache tomcat.My function is present in one of the POJO file which is instantiated in servelt.. – Adi Nov 09 '13 at 14:57
  • OK, agreed - in that case follow the approved answer in this question: http://stackoverflow.com/questions/4044726/how-to-set-a-timer-in-java – blalasaadri Nov 09 '13 at 14:58

1 Answers1

0

I've attempted to answer your question in your other thread: How to execute function automatically at specified time in java

For future references please keep your questions to one thread only though!

Community
  • 1
  • 1
Chikilah
  • 490
  • 2
  • 8