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.
我希望每天在特定时间执行一项操作,例如 sql 中的触发器,但我希望在 c#.net 中执行此操作,任何人都可以帮助我,
谢谢
通常,您正在创建循环,然后检查是否该采取行动了。它应该始终在运行进程(服务或托盘中的应用程序等)。
这取决于您需要在计时器中保持多清晰:如果它需要以秒为单位,您需要在 1 秒内创建间隔,并在Elapsed处理程序中检查您的目标时间与当前时间,如果为真 - 火警(事件)。
Elapsed