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 | 398 | string tasktorunpars = st.Xml_Commandname.Quote(); |
| 399 | 399 | |
| 400 | 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 | 404 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.DAILY)) { schedulepars += "/SC DAILY"; } |
| 404 | 405 | else if (st.Xml_Schedule == nameof(ScheduledTask.XmlStructure.ScheduledTask.Attributes.Schedule.Values.HOURLY)) { schedulepars += "/SC DAILY /RI 60 /DU 24:00 /K"; } |
| 405 | 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 | 451 | public int Xml_Priority; |
| 451 | 452 | public string Xml_Schedule; |
| 452 | 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 | 463 | public bool Xml_Enable = XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT; |
| 454 | 464 | public bool Xml_Run=XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT; |
| 455 | 465 | public string Xml_Commandname; |
| ... | ... | @@ -489,6 +499,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS |
| 489 | 499 | Xml_Priority = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Priority), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Priority.Values.DEFAULT); |
| 490 | 500 | Xml_Schedule = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Schedule), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Schedule.Values.DEFAULT); |
| 491 | 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 | 503 | Xml_Enable = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Enable), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Enable.Values.DEFAULT); |
| 493 | 504 | Xml_Run = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Run), scheduledtaskxml, XmlStructure.ScheduledTask.Attributes.Run.Values.DEFAULT); |
| 494 | 505 | Xml_Commandname = GetValue(nameof(XmlStructure.ScheduledTask.Attributes.Command), scheduledtaskxml, ""); |
| ... | ... | @@ -519,13 +530,8 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ScheduledTaskManagerNS |
| 519 | 530 | public static class Key { public static class Values { public const string DEFAULT = ""; } } |
| 520 | 531 | public static class Name { } |
| 521 | 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 | 535 | public static class Schedule |
| 530 | 536 | { |
| 531 | 537 | public static class Values | ... | ... |
Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs
| ... | ... | @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; |
| 32 | 32 | // You can specify all the values or you can default the Build and Revision Numbers |
| 33 | 33 | // by using the '*' as shown below: |
| 34 | 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")] | ... | ... |