Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need function which is called continuously in the background for sending mail to receipt on date or time which is scheduled by the sender in my website project.

Please help me. How do I setup my schedule and continuously check date and time for pertinence event set by sender?
Posted
Updated 18-Apr-13 8:49am
v3

You could use the TaskScheduler[^]

Add a reference to the TaskScheduler x.x Type Library, which provides access to TaskScheduler:
TaskScheduler.TaskScheduler ts = new TaskScheduler.TaskScheduler();

and all the other objects in the Task Scheduler API[^]


Best regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 25-Apr-13 18:51pm    
Apparently, it would work, a 5.
—SA
Espen Harlinn 25-Apr-13 18:52pm    
Thank you, Sergey :-D
Personally I wouldn't worry about scheduling in the code. Window's already has a task scheduler. I'd write your code to check if a mail is to be sent, sends it where required.

But I'd just execute that code as a command line exe using Windows Task Scheduler.
 
Share this answer
 
Hello,

I propose to create a windows service with a timer object, which is possible to establish a direct relationship between the events of the windows service and timer object.

If you need help with your other components, add a comment.

Good luck,
JAFC
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900