diff --git a/Vrh.Log4Pro.MaintenanceConsole/Manager - ScheduledTaskManager.cs b/Vrh.Log4Pro.MaintenanceConsole/Manager - ScheduledTaskManager.cs index a6687b5..6efb8ac 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Manager - ScheduledTaskManager.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Manager - ScheduledTaskManager.cs @@ -398,8 +398,9 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS string tasktorunpars = st.Xml_Commandname.Quote(); string schedulepars = ""; - if (st.Xml_Schedule==nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.MONTHLY)) { schedulepars += "/SC MONTHLY /D 1"; } - else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.WEEKLY)) { schedulepars += "/SC WEEKLY /D MON"; } + + if (st.Xml_Schedule==nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.MONTHLY)) { schedulepars += $"/SC MONTHLY /D {st.Xml_NumOfDay}"; } + else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.WEEKLY)) { schedulepars += $"/SC WEEKLY /D {st.Xml_NameOfDay}"; } else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.DAILY)) { schedulepars += "/SC DAILY"; } else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.HOURLY)) { schedulepars += "/SC DAILY /RI 60 /DU 24:00 /K"; } else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.CONTINOUS)) { schedulepars += "/SC DAILY /RI 5 /DU 24:00 /K"; } @@ -450,6 +451,15 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS public int Xml_Priority; public string Xml_Schedule; public DateTime Xml_StartTime; + public int Xml_NumOfDay; + public string Xml_NameOfDay + { + get + { + var namearray = new string[] { "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN", }; + return namearray[Xml_NumOfDay - 1]; + } + } public bool Xml_Enable = XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT; public bool Xml_Run=XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT; public string Xml_Commandname; @@ -489,6 +499,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS Xml_Priority = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Priority), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Priority.Values.DEFAULT); Xml_Schedule = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Schedule), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Schedule.Values.DEFAULT); Xml_StartTime = DateTime.Parse(GetValue(nameof(XmlStructure.ScheduledTask.Attributes.StartTime), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.StartTime.Values.DEFAULT)); + Xml_NumOfDay = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.NumOfDay), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.NumOfDay.Values.DEFAULT); Xml_Enable = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Enable), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT); Xml_Run = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Run), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT); Xml_Commandname = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Command), scheduledtaskxml, ""); @@ -519,13 +530,8 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS public static class Key { public static class Values { public const string DEFAULT = ""; } } public static class Name { } public static class StartTime { public static class Values { public const string DEFAULT = "04:00"; } } - public static class Priority - { - public static class Values - { - public const int DEFAULT = 7; - } - } + public static class Priority { public static class Values { public const int DEFAULT = 7; } } + public static class NumOfDay { public static class Values { public const int DEFAULT = 1; } } public static class Schedule { public static class Values diff --git a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs index 54cfaa4..6ea1d84 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.10.1.0")] -[assembly: AssemblyFileVersion("1.10.1.0")] +[assembly: AssemblyVersion("1.10.2.0")] +[assembly: AssemblyFileVersion("1.10.2.0")] -- libgit2 0.21.2