Commit e312d490817c942c2cb173da82b3a7b55b6376a5
1 parent
a95c6f04
v1.10.2
ScheduledTask-ok esetén a WEEKLY és MONHTLY esetben a nap megadható a NumOfDay xml elemeben
Showing
2 changed files
with
17 additions
and
11 deletions
Show diff stats
Vrh.Log4Pro.MaintenanceConsole/Manager - ScheduledTaskManager.cs
@@ -398,8 +398,9 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | @@ -398,8 +398,9 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | ||
398 | string tasktorunpars = st.Xml_Commandname.Quote(); | 398 | string tasktorunpars = st.Xml_Commandname.Quote(); |
399 | 399 | ||
400 | string schedulepars = ""; | 400 | string schedulepars = ""; |
401 | - if (st.Xml_Schedule==nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.MONTHLY)) { schedulepars += "/SC MONTHLY /D 1"; } | ||
402 | - else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.WEEKLY)) { schedulepars += "/SC WEEKLY /D MON"; } | 401 | + |
402 | + if (st.Xml_Schedule==nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.MONTHLY)) { schedulepars += $"/SC MONTHLY /D {st.Xml_NumOfDay}"; } | ||
403 | + else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.WEEKLY)) { schedulepars += $"/SC WEEKLY /D {st.Xml_NameOfDay}"; } | ||
403 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.DAILY)) { schedulepars += "/SC DAILY"; } | 404 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.DAILY)) { schedulepars += "/SC DAILY"; } |
404 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.HOURLY)) { schedulepars += "/SC DAILY /RI 60 /DU 24:00 /K"; } | 405 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.HOURLY)) { schedulepars += "/SC DAILY /RI 60 /DU 24:00 /K"; } |
405 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.CONTINOUS)) { schedulepars += "/SC DAILY /RI 5 /DU 24:00 /K"; } | 406 | 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 | @@ -450,6 +451,15 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | ||
450 | public int Xml_Priority; | 451 | public int Xml_Priority; |
451 | public string Xml_Schedule; | 452 | public string Xml_Schedule; |
452 | public DateTime Xml_StartTime; | 453 | public DateTime Xml_StartTime; |
454 | + public int Xml_NumOfDay; | ||
455 | + public string Xml_NameOfDay | ||
456 | + { | ||
457 | + get | ||
458 | + { | ||
459 | + var namearray = new string[] { "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN", }; | ||
460 | + return namearray[Xml_NumOfDay - 1]; | ||
461 | + } | ||
462 | + } | ||
453 | public bool Xml_Enable = XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT; | 463 | public bool Xml_Enable = XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT; |
454 | public bool Xml_Run=XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT; | 464 | public bool Xml_Run=XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT; |
455 | public string Xml_Commandname; | 465 | public string Xml_Commandname; |
@@ -489,6 +499,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | @@ -489,6 +499,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | ||
489 | Xml_Priority = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Priority), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Priority.Values.DEFAULT); | 499 | Xml_Priority = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Priority), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Priority.Values.DEFAULT); |
490 | Xml_Schedule = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Schedule), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Schedule.Values.DEFAULT); | 500 | Xml_Schedule = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Schedule), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Schedule.Values.DEFAULT); |
491 | Xml_StartTime = DateTime.Parse(GetValue(nameof(XmlStructure.ScheduledTask.Attributes.StartTime), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.StartTime.Values.DEFAULT)); | 501 | Xml_StartTime = DateTime.Parse(GetValue(nameof(XmlStructure.ScheduledTask.Attributes.StartTime), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.StartTime.Values.DEFAULT)); |
502 | + Xml_NumOfDay = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.NumOfDay), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.NumOfDay.Values.DEFAULT); | ||
492 | Xml_Enable = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Enable), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT); | 503 | Xml_Enable = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Enable), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT); |
493 | Xml_Run = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Run), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT); | 504 | Xml_Run = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Run), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT); |
494 | Xml_Commandname = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Command), scheduledtaskxml, ""); | 505 | Xml_Commandname = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Command), scheduledtaskxml, ""); |
@@ -519,13 +530,8 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | @@ -519,13 +530,8 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS | ||
519 | public static class Key { public static class Values { public const string DEFAULT = ""; } } | 530 | public static class Key { public static class Values { public const string DEFAULT = ""; } } |
520 | public static class Name { } | 531 | public static class Name { } |
521 | public static class StartTime { public static class Values { public const string DEFAULT = "04:00"; } } | 532 | public static class StartTime { public static class Values { public const string DEFAULT = "04:00"; } } |
522 | - public static class Priority | ||
523 | - { | ||
524 | - public static class Values | ||
525 | - { | ||
526 | - public const int DEFAULT = 7; | ||
527 | - } | ||
528 | - } | 533 | + public static class Priority { public static class Values { public const int DEFAULT = 7; } } |
534 | + public static class NumOfDay { public static class Values { public const int DEFAULT = 1; } } | ||
529 | public static class Schedule | 535 | public static class Schedule |
530 | { | 536 | { |
531 | public static class Values | 537 | public static class Values |
Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | ||
32 | // You can specify all the values or you can default the Build and Revision Numbers | 32 | // You can specify all the values or you can default the Build and Revision Numbers |
33 | // by using the '*' as shown below: | 33 | // by using the '*' as shown below: |
34 | // [assembly: AssemblyVersion("1.0.*")] | 34 | // [assembly: AssemblyVersion("1.0.*")] |
35 | -[assembly: AssemblyVersion("1.10.1.0")] | ||
36 | -[assembly: AssemblyFileVersion("1.10.1.0")] | 35 | +[assembly: AssemblyVersion("1.10.2.0")] |
36 | +[assembly: AssemblyFileVersion("1.10.2.0")] |