在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在晚上12点执行任务
using System; namespace WindowsService2 protected override void OnStart(string[] args) timer1.Interval = 3000; //设置计时器事件间隔执行时间 timer1.Elapsed += new System.Timers.ElapsedEventHandler(timer1_Elapsed); timer1.Enabled = true; if (!EventLog.SourceExists("OnStart222")) EventLog.WriteEntry("OnStart222", "开始任务了"); protected override void OnStop() private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论