Scheduled Mail in asp.net

前端 未结 5 624
渐次进展
渐次进展 2021-01-25 07:54

Hai Guys, My application deals scheduled mail concept (i.e) every morning 6.00 am my users gets a remainder mail about their activities for the day... I dont know how t

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-25 08:34

    Okay this is interesting, and what I did fits silky's definite of 'cheating', but no it was pretty cool for me.

    What I did was spawn a new thread from ASP.Net code (it was possible on that host), and that thread did the scheduled job.

    I checked whether the thread was alive (which is pretty easy) on every visit to the website (not so reliable I know, but it worked cause that website has plenty of visitor).

    If at all you do this

    • Treat this as a stop-gap while you arrange to get a dedicated host or VPS.
    • Rest assured that the hosting company will kill your thread and withdraw permissions when they discover you're doing this.

提交回复
热议问题