tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From modny...@mediaondemand.com
Subject Re: Running a process/service
Date Thu, 28 Sep 2000 15:27:11 GMT
For time-based maintenance tasks i found very usefull a small package from coolservlets.com
called ServletMaintenance. It cannot be programmed to a run at a specific time but rather
between a specified time-interval (Days-hours-minutes). 
Programming a process to run at a specific time is a little bit more complicated, you have
for example a thread that checks every 1 minute the time and if the hours part of the time
is 5 then it executes the task. 
In other words if you want to do something at 5:pm you need to check every 1 minute if you
want to have "minute" accuracy. After the task is executed you don't want it to be executed
again in the next check that will happen at 5:01.
So you also need to compare the DAY as well and if it is still the same day do not execute
again.  

Alex.
------  Original Message --------

 From:    s0s7900@unix.tamu.edu

 To:      tomcat-user@jakarta.apache.org

 Sent:    Wed Sep 27 20:40:03 EDT 2000

 Subject: Running a process/service


Hi everybody,
   I was trying to find a way in which I should be able to run a process
to check for birthdays everynight at 12:00 and automatically send an email
to that person.I have figurde out how to send the email in java using the
smtp class but i still havent found out how to run a process or service in
java irrespective of who has looged on or if anybody has logged on(i am
using win2k) and then run the java code and send emails to the person who
has a birthday.
Any help is welcome,
Thanks for ur time,
Shravan




Mime
View raw message