Windows服务VS简单的程序 [英] Windows Service Vs Simple Program

查看:174
本文介绍了Windows服务VS简单的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我举一个回地面供大家之前,我去我的问题。我公司主机的网站很多客户,我公司还承包了一些工作,以另一家公司。
所以,当我们第一次设置了所有的信息给我们的客户一个网站,我们通过这些信息我们签约其他公司,我们三个人有相同的数据。问题是,一旦该网站是启动和运行,我们的客户会改变一些数据,并当过他们这样做,我们应该能够更新我们的签约公司。
我们的数据传送到承包公司的方式是通过使用网络服务(httppost,XML数据)。现在我的问题是它写一个程序更新的数据发送到签约公司的最佳方式,每次客户更改一些数据。

Let me give a back ground for everybody before I go to my problem. My company hosts website for many clients, my company also contracts some of the work to another company. So when we first set up a website with all the informations to our clients, we pass that information to the other company we contracted and three of us have the same data. Problem is once the site is up and running, our clients will change some data and when ever they do that we should be able to update our contracted company. The way we transfer data to the contracted company is by using a web service (httppost, xml data). Now my question is what it the best way to write a program which sends updated data to the contracted company everytime our clients change some data.

1)写有我的code内部的定时器,每一个30分钟左右的连接到数据库中的窗口服务,并找到所有的变化,并将其发送给签约公司
2)收件相同code#1(以出它的定时器),但这次让一个简单的程序,并让Windows调度唤醒它每次30min
3)任何其他建议,你可能有

1) Write a windows service having a timer inside my code where every 30min or so connects to the database and find all changes and send it to the contracted company 2) Write the same code as #1 (with out the timer in it) but this time make it a simple program and let windows scheduler wake it every 30min 3) Any other suggestion you may have

可我Techenologies是VS 2008,2005年的SQLServer

Techenologies available for me are VS 2008, SQLServer 2005

推荐答案

预定的任务是要走的路。乔恩写了为什么服务不适合这样的事情一个很好的总结:的 http://weblogs.asp.net/jgalloway/archive/2005/10/24/428303.aspx

Scheduled task is the way to go. Jon wrote up a good summary of why services are not well suited for this sort of thing: http://weblogs.asp.net/jgalloway/archive/2005/10/24/428303.aspx

这篇关于Windows服务VS简单的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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