本文介绍了Windows服务无法自动启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我尝试了几种方法来完成这项工作,但只找到了解决方法。所以我发布这是最后一次试用。


我有一个Windows服务,必须启动并生成一个文件,并在每个星期一和星期五通过电子邮件发送给我们的客户。


服务仅在我停止并启动它时执行此操作。但是如果没有人启动它就必须这样做。我知道我们使用计时器。我也是。但我不知道这个问题是什么。计时器应该每天开始并检查它是星期一还是星期五它没有做。


以下是我的代码



Hi,

I have tried several ways to make this work but only found work arounds. so I am posting this as a last trial.

I have a windows service which has to kick start and generate a file and email it to our clients every monday and friday.

the service does this only when i stop it and start it. but it has to do this without someone starting it. i know we use a timer for this. i did too. but i dont know whats the issue. the timer is supposed to start everyday and check if its a monday or friday which it is not doing.

below is my code



展开 | 选择 | Wrap | 行号

推荐答案




这篇关于Windows服务无法自动启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:28