计划任务或 Windows 服务 [英] scheduled task or windows service

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

问题描述

我的团队正在争论哪个更好:Windows 服务还是计划任务.我们有一个专门用于运行作业的服务器,目前它们都是计划任务.一些作业获取文件、重命名它们并将它们放置在网络上的其他目录中.其他作业从 SQL 中提取数据,对其进行修改,然后将其传送到其他地方.其他作业ftp文件出来.种类繁多,但总的来说,它们相当简单.

My team is having a debate which is better: a windows service or scheduled tasks. We have a server dedicated to running jobs and currently they are all scheduled tasks. Some jobs take files, rename them and place them in other directories on the network. Other jobs extract data from SQL, modify it, and ship it elsewhere. Other jobs ftp files out. There is a lot of variety, but all in all, they are fairly straightforward.

我偏向于将其中的每一个都作为 Windows 服务而不是计划任务运行,因为监视 Windows 服务比监视计划任务要容易得多.有些人是截然相反的.最后,我们中没有人有那么多经验来提供两种方法之间的实际事实比较.我正在寻找一些关于其他人经历的反馈.

I am partial to having each of these run as a windows service instead of a scheduled task because it is so much easier to monitor a windows service than a scheduled task. Some are diametrically opposed. In the end, none of us have that much experience to provide actual factual comparisons between the two methods. I am looking for some feedback on what other have experienced.

推荐答案

如果一直运行 - windows 服务.

If it runs constantly - windows service.

如果需要以不同的时间间隔运行 - 计划任务.

If it needs to be run at various intervals - scheduled task.

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

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