Issue with timer

J

jagadesh

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
 
M

Mayeul

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?
 
M

Martin Gregorie

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.
 
R

Roedy Green

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)
 
V

Volker Borchert

jagadesh said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top