简体   繁体   中英

Trigger by Windows task scheduler

I am developing a web application with ASP.NET and SQL Server Express and I want to check a status in database. After two days data is saved, if status is not changed, I want to call another function like SendEmail() . I have to use Windows Task Scheduler, I researched it but it seems for C++ developers. How can I relate Windows Task Manager and SQL Server Express, and how can I control a specific value for each row in a table?

You'll want a long running c# application, either a console app that doesn't go away, or a windows service that runs using windows services.

In that app, you connect to your DB, do your query, and act on it how you'd like.

The other option is to write a normal c# app, that queries the DB, acts on the result. Then, simply schedule it in your windows scheduler (by hand) to run on whatever interval you'd like.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM