1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Do An Action In Specific Date and Time

Discussion in 'C#' started by naoyinuy, Jul 7, 2011.

  1. #1
    Hi all
    I wanna do something like timing with ASP.net(c#).
    for example I specify a date for sending an email (or any other jobs).
    How can I do this? I don't have any idea.
    any suggestion can help me.

    thanks in advance.
    naoyinuy, Jul 7, 2011 IP
  2. RonBrown

    RonBrown Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    Write the code that does what you need, then set up a schedule on the server to run that code (acccessed from the Control Panel in Windows). If you're on a dedicated server doing that is easy, if you're on shared/reseller hosting you'll have to ask the host if they can set one up for you (they may refuse) but many windows control panels have the ability to set up schedules so you might want to check that out.

    It's the only way to do this reliably as web sites don't actually do anything until someone visits a page. If your site is busy enough you might be able to rely on enough people visiting the site to trigger the code you need at the correct time, but I wouldn't want to rely upon this. Setting up a schedule is the only way - just like a CRON job on Linux.
    RonBrown, Jul 7, 2011 IP
    webveins likes this.
  3. DmitryS

    DmitryS Active Member

    Likes Received:
    Best Answers:
    Trophy Points:

    create a webservice that check for date. what your spacified date comes it will perform some action.
    DmitryS, Jul 8, 2011 IP