• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mail Alerts on birthdays

 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

Currently I am working on a project which uses servlets and jsp. I am sending mails from my jsp page. But now I have struck at one point. I need to send automatic mail on his birthday date which he registered . I am using mysql database as back end . Any solution will be most useful for me.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP and servlets will be of no help to you in this task.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is preventing you from getting a solution?

(We don't like to do people's work for them here, but we do like to work with them as they do it.)
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaMail would be of help for your project
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:JSP and servlets will be of no help to you in this task.



Sir How can i achieve this without servlets and jsp's . Is there any other technology or else please give me your valuable reply...
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashwin Sridhar wrote:JavaMail would be of help for your project



Actually I am sending mails when clicking on button like "tell to friend" but what is my intention is there must be a thread that must be working as long as the application is in server whether client requests or not .


Executing a thread until server stops.... this is my requirement any suggestion....

Thanks in advance
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:What is preventing you from getting a solution?

(We don't like to do people's work for them here, but we do like to work with them as they do it.)



Actually I am sending mails when clicking on button like "tell to friend" but what is my intention is there must be a thread that must be working as long as the application is in server whether client requests or not .

I struck at how to run a thread continuously until server stops/ application is deleted from server.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd just write a standalone application that would be triggered by a cron job once a day and send out emails as necessary.
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for replying sir,

Bear Bibeault wrote:I'd just write a standalone application that would be triggered by a cron job once a day and send out emails as necessary.



Sir i think i have to use threads is n't it? if it which thread i have to use.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, why? Just write an application that checks the db for birthdays, sends out emails as appropriate, and shuts down. Run it once a day as a cron job. Why make things more difficult than they need to be?
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:No, why? Just write an application that checks the db for birthdays, sends out emails as appropriate, and shuts down. Run it once a day as a cron job. Why make things more difficult than they need to be?


Thanks for reply

I am unaware of cron jobs as i am fresher. is there any API to built cron jobs in java . when i searched in google it shows Quartz API to develop cron jobs any other resource i don't want to use any third party tools like quartz is there any please reply me I am eagerly waiting for your reply....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the other way around, cron starts the Java program. Again, you are making this too complicated.

On Windows, you'll need to find the equivalent for cron.
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:It's the other way around, cron starts the Java program. Again, you are making this too complicated.

On Windows, you'll need to find the equivalent for cron.


Thanks for reply,


This answer is correct if in my own system i have to send mails ,

But equivalent to cron jobs is Scheduled tasks in windows I may configure this tasks in my windows system. But requirement is I have to place application in server(On web). and takes date of birth from mysql database using JDBC and sends mail...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the server a Unix system?
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Is the server a Unix system?


yes sir.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it will have cron.
 
mike mimmis
Ranch Hand
Posts: 57
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Then it will have cron.


I got the solution Thanks a lot sir......
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic