Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Issue with timer

Reply
Thread Tools

Issue with timer

 
 
jagadesh
Guest
Posts: n/a
 
      12-05-2008
HI Guys,

I have an issue with the timer.let me clear
my requirement is i need to send a mail to a user at a particular
time . so i have written a timer and set it to run continuously and
check the database if it matches a date.if it then it sends the mail .
now the issue is this sending of mail is done only when application is
open.so i want to send the mail even my application is not open much
like i need to write some native threads or some sort of thing.


can any one please provide me the some Solution.

thank u
jagadesh
 
Reply With Quote
 
 
 
 
Mayeul
Guest
Posts: n/a
 
      12-05-2008
jagadesh a écrit :
> HI Guys,
>
> I have an issue with the timer.let me clear
> my requirement is i need to send a mail to a user at a particular
> time . so i have written a timer and set it to run continuously and
> check the database if it matches a date.if it then it sends the mail .
> now the issue is this sending of mail is done only when application is
> open.so i want to send the mail even my application is not open much
> like i need to write some native threads or some sort of thing.
>
>
> can any one please provide me the some Solution.
>
> thank u
> jagadesh


If your application is not open, it is very unlikely to be able to:
- notice it is time to send a mail
- actually send the mail.

What am I getting wrong from your question?

--
Mayeul
 
Reply With Quote
 
 
 
 
Martin Gregorie
Guest
Posts: n/a
 
      12-05-2008
On Fri, 05 Dec 2008 01:18:46 -0800, jagadesh wrote:

> HI Guys,
>
> I have an issue with the timer.let me clear my requirement is i need to
> send a mail to a user at a particular time . so i have written a timer
> and set it to run continuously and check the database if it matches a
> date.if it then it sends the mail . now the issue is this sending of
> mail is done only when application is open.so i want to send the mail
> even my application is not open much like i need to write some native
> threads or some sort of thing.
>
>

1) write a background task (no GUI, separate from the
user-facing application) whose only function is to
send messages when they are due to be sent.

2) set it to start up when the computer is booted

3) make sure it sends any overdue messages when it is started.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      12-05-2008
On Fri, 5 Dec 2008 01:18:46 -0800 (PST), jagadesh
<> wrote, quoted or indirectly quoted
someone who said :

> i want to send the mail even my application is not open much
>like i need to write some native threads or some sort of thing.


Your choices are:

1. use a chron utility or other tool that comes with your OS.

2. write a small app that hangs around permanently in the background.
to get its size down, compile it natively. See
http://mindprod.com/jgloss/nativecompiler.html

In my night dreams I am writing the code for just such an app to
upload recent changes to my website every 30 minutes and refresh the
various "daily" quotations.
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
whose ultimate consequences could be second only to global nuclear war."
~ Environment Canada (The Canadian equivalent of the EPA on global warming)
 
Reply With Quote
 
Volker Borchert
Guest
Posts: n/a
 
      12-06-2008
jagadesh wrote:
> I have an issue with the timer.let me clear
> my requirement is i need to send a mail to a user at a particular
> time . so i have written a timer and set it to run continuously and
> check the database if it matches a date.if it then it sends the mail .
> now the issue is this sending of mail is done only when application is
> open.so i want to send the mail even my application is not open much
> like i need to write some native threads or some sort of thing.


man crontab

--

"I'm a doctor, not a mechanic." Dr Leonard McCoy <>
"I'm a mechanic, not a doctor." Volker Borchert <>
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      12-06-2008
Roedy Green wrote:
> Your choices are:
>
> 1. use a chron utility or other tool that comes with your OS.


Is chron better than cron ?



Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I know about the shutdown timer, is there a "switch on" timer... Mal Carter Computer Support 3 01-12-2008 01:58 AM
page timer, or redirect timer Simon ASP .Net 1 11-04-2005 07:14 PM
System.Timers.Timer/System.Threading.Timer Not Firing At All on Dev Server james.e.coleman@gmail.com ASP .Net 1 02-22-2005 09:41 PM
Java 1.3 java.util.Timer - issue! amy j Java 4 10-13-2004 08:06 PM
System.Timers.Timer vs. System.Threading.Timer Kelsang Wangchuk ASP .Net 0 07-31-2003 04:28 PM



Advertisments