如何使用Windows服务每天在特定时间调用方法?

编程入门 行业动态 更新时间:2024-10-15 18:27:17
本文介绍了如何使用Windows服务每天在特定时间调用方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 如何每天在特定时间使用Windows服务调用特定方法?还是有其他替代方法? 实际上,我的功能是每天在特定时间通过短信和电子邮件发送提醒.请帮助我...在此先感谢.....

hi to all, How to call a particular method daily on specific time using windows service? or is there any alternative way to do this? Actually my functionality is to send reminder by sms and email on specific time daily. please help me... Thanks in advance.....

推荐答案

您可以使用控制台应用程序而不是Windows服务,并使用计划任务进行调用: msdn.microsoft/en-us/library/ms438026.aspx [ ^ ] windows.microsoft/en-US/windows7/schedule-a-task [ ^ ] 如果只需要根据计划运行某项内容,则无需为Windows服务实现自己的计划程序来重新发明轮子. You could use a console application instead of a windows service and call it using a scheduled task: msdn.microsoft/en-us/library/ms438026.aspx[^] windows.microsoft/en-US/windows7/schedule-a-task[^] If the requirement is just to run something based on a schedule it doesn''t make sense to reinvent the wheel by implementing your own scheduler for a windows service.

更多推荐

如何使用Windows服务每天在特定时间调用方法?

本文发布于:2023-11-27 13:37:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638299.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   时间   方法   在特定   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!