在服务器上自动执行的代码 [英] code to be executed automatic on server

查看:106
本文介绍了在服务器上自动执行的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个c#4 Windows应用程序.

该应用程序创建工作团队会议和会议.然后向工作团队成员发送电子邮件.
数据库在互联网上发布,而不是在本地发布,因为该应用程序将由不同的人访问.

我的问题是,当有人创建会议时,他可能会说每周都会重复一次.
因此,我需要为每个开会周在数据库中添加新行.但是问题是我无法从我的应用程序中执行此操作,因为我不知道应用程序何时打开.也许有人打开了应用程序,创建了一个会议,然后关闭了应用程序&直到他要创建新会议才打开.

因此,我需要在已发布的服务器上可以正常工作的东西,检查是否有新会议要召开,并向成员发送电子邮件.在数据库中添加新行.
因此,我需要在服务器上自动运行的代码,该代码每半小时检查一次是否有新的会议要做.

我该怎么办?
任何人都可以帮忙.

针对语法和拼写进行了编辑

I am creating a c#4 windows application.

This application creates work team meetings & then sends email to work team members.
Database is published on the internet not local because this application will be accessed from different people.

My problem is when someone creates a meeting he may say it''ll repeated each week.
So what I need is to add new rows in the database for each meet week. But the problem is that I can''t do that from my application because I don''t know when the application opens. Maybe someone opens the appliction, creates a meeting and then closes the application & didn''t open until he want to creat new meeting.

So i need something that works on published server that do that work, check if new meeting is near and send an email to members & add new row in database.
So i need code that runs automatically on server that checks every half hour if there''s new meeting to do.

How can i do that?
Anyone help please.

Edited for grammar and spelling

推荐答案

您需要做的是创建一个在您自己的服务器上运行的Windows服务,可以经常检查是否已创建新会议.如果检查结果是肯定的,则该服务可以通过电子邮件将有关会议的详细信息发送给各个成员.
What you will need to do, is to create a windows service that runs on your own server, that can check every so often whether a new meeting has been created. If the check is positive, then the service can email the respective members the exact details of the meeting.


您可以为此使用Windows服务...

Windows服务从这里开始...
简单Windows服务示例 [
You can go for windows service for this...

for windows service starts here...
Simple Windows Service Sample[^]


这篇关于在服务器上自动执行的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆