如题,长时间运行后,有时会变慢或出错,希望服务端能每天早上1点钟自动关闭并重启动一次,如何写代码比较好?
计划管理里面这样写,间隔2100000,好像会启动多次,请帮助改改,或是有啥更好的方法没?
static cqdsj As Date = Date.today.AddDays(-1)If cqdsj <> Date.today AndAlso Date.Now.Hour = 1 Then cqdsj = Date.today Application.restartEnd If