Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有服务。我想验证,如果现在日期 == 某个日期 -> 做某事
如何将 Windows 任务计划程序用于每年在同一天(例如 11 月 15 日)触发的事件
请给我使用与某个日期相关的 Windows 任务计划程序(类、参数、属性、方法)的示例。
对于这样的事情,我相信您应该制作一个应用程序来执行您的任务然后退出,然后使用 Windows 任务计划程序在正确的时间运行该作业。
一年运行一个程序一年运行一次方法并不是一个好的设计。另外,您必须考虑运行它的计算机或服务器几乎肯定不会全年保持在线,那么您的程序将如何应对重新启动等。