Either create a stored procedure on your MSSQL DB that would can run from a scheduled SQL job on a routine basis (low tech, easy to implement solution), or write a conse app that you can install as a service on the server running in the background ..
Hmmm, maybe create an aspx page that handles this separately and have a cron job call this page at certain intervals. This page will query the DB looking for entries that need to be emailed.
There are a few sites out there that provide free/paid cron jobs.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: