Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Sending periodic email from servlet

Thread view: 
hust6 - 25 Jul 2006 19:28 GMT
I have a question:

I have a series of servlets that allow users to interact with a
database.  One feature I would like to add, is to have an automated
email sent to me once a week to notify me of any changes that were
made.  I already have the code in place to send this to me on my
command, but I would like a way for this to happen, say for example,
every friday evening.

Could someone recommend to me a course of action on how to do this?
Currently, all my code is done in Java, so doing it through that would
be ideal.

Thanks in advance,
Matt
jhr - 25 Jul 2006 21:50 GMT
> I have a question:
>
[quoted text clipped - 11 lines]
> Thanks in advance,
> Matt

If on unix, run your current progam via a cron job.

Otherwise, you can use the java.util.Timer to schedule this type of
action using its scheduleAtFixedRate method.  This requires you to
implement you email app as a java.util.TimerTask.
Tajonis - 26 Jul 2006 19:56 GMT
> > I have a question:
> >
[quoted text clipped - 17 lines]
> action using its scheduleAtFixedRate method.  This requires you to
> implement you email app as a java.util.TimerTask.

another option would be to utilize Quartz
http://www.opensymphony.com/quartz/ it provides a rather extensive API
for scheduling.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.