添加项目文件。
This commit is contained in:
29
WPFWCSDemo/Schedules/GlobalTask.cs
Normal file
29
WPFWCSDemo/Schedules/GlobalTask.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WPFWCSDemo.StateCode;
|
||||
using WPFWCSDemo.Utilities;
|
||||
|
||||
namespace WPFWCSDemo.Schedules
|
||||
{
|
||||
/// <summary>
|
||||
/// 全局任务
|
||||
/// </summary>
|
||||
public static class GlobalTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 1\4\7\10月1日自动备份
|
||||
/// </summary>
|
||||
public static void SqlBackupForTime()
|
||||
{
|
||||
string time = DateTime.Now.ToString("MM-dd HH:mm");
|
||||
if (time == "04-01 01:15" || time == "07-01 01:15" || time == "10-01 01:15" || time == "01-01 01:15")
|
||||
{
|
||||
SqlDatabaseMaintenance.SQLBackupAuto();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user