Windows 任务调度程序用于调度代码重复运行的可靠性如何? [英] How reliable is windows task scheduler for scheduling code to run repeatedly?

查看:55
本文介绍了Windows 任务调度程序用于调度代码重复运行的可靠性如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些代码需要安装在 Windows Server 2003 机器上并且每分钟运行一次.

I have a bit of code that needs to sit on a windows server 2003 machine and run every minute.

推荐的处理方式是什么?将其设计为控制台服务并让任务调度程序每分钟都命中它是否可以?(这甚至可能吗?)我应该把它吸起来并把它写成一个 Windows 服务吗?

What is the recommended way of handling this? Is it ok to design it as a console service and just have the task scheduler hit it ever minute? (is that even possible?) Should I just suck it up and write it as a windows service?

推荐答案

由于它需要每分钟运行一次,我建议编写一个 Windows 服务.这不是很复杂,如果您以前从未这样做过,那么了解它是如何完成的对您来说会很棒.

Since it needs to run every single minute, I would suggest writing a Windows Service. It is not very complicated, and if you never did this before, it would be great for you to learn how it is done.

我不建议每分钟调用一次计划任务.

Calling the scheduled task every minute is not something I would recommend.

这篇关于Windows 任务调度程序用于调度代码重复运行的可靠性如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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