Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7042001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:06:55+00:00 2026-05-28T02:06:55+00:00

In a project I’m working on, users can subscribe themselves to a course. The

  • 0

In a project I’m working on, users can subscribe themselves to a course. The duration of the course is variable, calculated in weeks (so 4, 5, or 6 weeks). They can subscribe at any given moment, so the start date is different per user.

Now I want to send the users a personalized email at the beginning of every week (so when they enter the 2nd, 3rd, etc week.). The email is different every week.

I know I have to write a task and schedule that on a regular basis, but I’m not sure how I should select the correct users. I could write a SQL-command, selecting all users where the start-date is 7, 14, 21, or 28 days ago, and calculate what week they are in, but that seems quite error prone (what if the task fails, then they will not receive the message in the next task-cycle).

What would be the best way to achieve this?

The project is a ASP.NET MVC application in C#, with NHibernate on IIS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:06:55+00:00Added an answer on May 28, 2026 at 2:06 am

    you are talking about scheduling workflows that take place at a future date and time. this is best handled by a scheduler.

    conceptually you define what needs to be done and when it needs to be done. being that IIS will shutdown the website, if there are no users on the site hosting this process within IIS is not a good idea. a windows service would be a better choice. that way it’s always running the background ready to execute commands.

    the implementation of the scheduler could be as simple as storing the action in the database ad querying the database on a timed interval, executing tasks that should have happened.

    another option is to integrate a scheduling framework into your service like quartz.net.

    EDIT:
    what you are currently envisioning is an implicit definition of what should happen. in other words at the time the reminder is sent you calculate when and who should be notified.

    instead calculate these values at the time the use registers for the course and save this as an explicit event. everything you need would already be stored in the event, all that remains is determining what events should fire. and that should be easy enough: any event that should have already fired, but didn’t. once it fires delete the event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A project I'm working on at the moment involves refactoring a C# Com Object
Project I'm working on uses jQuery. I have a series of Ajax calls being
The project I'm working on has a legacy database with lots of information in
The project I am working on requires a whole bunch of queries towards a
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
My project solution does build without error but doesn't run any more :( I
My project has some references. One of them has no path. I can't view
The project I am working on requires some executions to be done at a
The project my team has been working on has reached a point where we
Project doesn't need any javascript libraries such as jQuery, Dojo, Prototype so there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.