|
1 | 1 | [ |
2 | 2 | { |
3 | 3 | "TaskName": "MyTaskName1", |
4 | | - "Action": [ |
5 | | - { |
6 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-1-1)\\\"\"", |
7 | | - "Execute": "powershell" |
8 | | - }, |
9 | | - { |
10 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-1-2)\\\"\"", |
11 | | - "Execute": "powershell" |
12 | | - } |
13 | | - ], |
| 4 | + "TaskPath": "\\MyTaskFolder\\", |
14 | 5 | "Trigger": [ |
15 | 6 | { |
16 | 7 | "AtStartup": true |
17 | 8 | }, |
18 | 9 | { |
| 10 | + "DaysInterval": 1, |
| 11 | + "Daily": true, |
19 | 12 | "At": { |
| 13 | + "Day": 30, |
| 14 | + "Second": 0, |
20 | 15 | "Year": 1999, |
21 | | - "Hour": 17, |
22 | 16 | "Minute": 30, |
23 | | - "Second": 0, |
24 | | - "Day": 30, |
| 17 | + "Hour": 17, |
25 | 18 | "Month": 11 |
26 | | - }, |
27 | | - "Daily": true, |
28 | | - "DaysInterval": 1 |
| 19 | + } |
| 20 | + } |
| 21 | + ], |
| 22 | + "Action": [ |
| 23 | + { |
| 24 | + "Execute": "powershell", |
| 25 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-1-1)\\\"\"" |
| 26 | + }, |
| 27 | + { |
| 28 | + "Execute": "powershell", |
| 29 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-1-2)\\\"\"" |
29 | 30 | } |
30 | 31 | ], |
31 | | - "Settings": { |
32 | | - "DontStopIfGoingOnBatteries": true, |
33 | | - "Disable": false, |
34 | | - "AllowStartIfOnBatteries": true |
35 | | - }, |
36 | 32 | "Principal": { |
37 | | - "UserId": "myusername", |
38 | 33 | "LogonType": "S4U", |
| 34 | + "UserId": "myusername", |
39 | 35 | "RunLevel": "Highest" |
40 | 36 | }, |
41 | | - "TaskPath": "\\MyTaskFolder\\" |
| 37 | + "Settings": { |
| 38 | + "Disable": false, |
| 39 | + "DontStopIfGoingOnBatteries": true, |
| 40 | + "AllowStartIfOnBatteries": true |
| 41 | + } |
42 | 42 | }, |
43 | 43 | { |
44 | 44 | "TaskName": "MyTaskName2", |
45 | | - "Action": [ |
46 | | - { |
47 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-2-1)\\\"\"", |
48 | | - "Execute": "powershell" |
49 | | - }, |
50 | | - { |
51 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-2-2)\\\"\"", |
52 | | - "Execute": "powershell" |
53 | | - } |
54 | | - ], |
| 45 | + "TaskPath": "\\MyTaskFolder\\", |
55 | 46 | "Trigger": [ |
56 | 47 | { |
| 48 | + "Once": true, |
57 | 49 | "At": { |
| 50 | + "Day": 30, |
| 51 | + "Second": 0, |
58 | 52 | "Year": 1999, |
59 | | - "Hour": 14, |
60 | 53 | "Minute": 0, |
61 | | - "Second": 0, |
62 | | - "Day": 30, |
| 54 | + "Hour": 14, |
63 | 55 | "Month": 11 |
64 | 56 | }, |
65 | | - "Once": true, |
66 | 57 | "RepetitionInterval": { |
67 | | - "Minute": 0, |
| 58 | + "Second": 0, |
68 | 59 | "Hour": 12, |
69 | | - "Second": 0 |
| 60 | + "Minute": 0 |
70 | 61 | } |
71 | 62 | } |
72 | 63 | ], |
73 | | - "Settings": { |
74 | | - "DontStopIfGoingOnBatteries": true, |
75 | | - "Disable": false, |
76 | | - "AllowStartIfOnBatteries": true |
77 | | - }, |
| 64 | + "Action": [ |
| 65 | + { |
| 66 | + "Execute": "powershell", |
| 67 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-2-1)\\\"\"" |
| 68 | + }, |
| 69 | + { |
| 70 | + "Execute": "powershell", |
| 71 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-2-2)\\\"\"" |
| 72 | + } |
| 73 | + ], |
78 | 74 | "Principal": { |
79 | | - "UserId": "NT AUTHORITY\\SYSTEM", |
80 | 75 | "LogonType": "S4U", |
| 76 | + "UserId": "NT AUTHORITY\\SYSTEM", |
81 | 77 | "RunLevel": "Limited" |
82 | 78 | }, |
83 | | - "TaskPath": "\\MyTaskFolder\\" |
| 79 | + "Settings": { |
| 80 | + "Disable": false, |
| 81 | + "DontStopIfGoingOnBatteries": true, |
| 82 | + "AllowStartIfOnBatteries": true |
| 83 | + } |
84 | 84 | }, |
85 | 85 | { |
86 | 86 | "TaskName": "MyTaskName3", |
87 | | - "Action": [ |
88 | | - { |
89 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-3-1)\\\"\"", |
90 | | - "Execute": "powershell" |
91 | | - }, |
92 | | - { |
93 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-3-2)\\\"\"", |
94 | | - "Execute": "powershell" |
95 | | - }, |
96 | | - { |
97 | | - "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-3-3)\\\"\"", |
98 | | - "Execute": "powershell" |
99 | | - } |
100 | | - ], |
| 87 | + "TaskPath": "\\MyTaskFolder\\", |
101 | 88 | "Trigger": [ |
102 | 89 | { |
| 90 | + "DaysInterval": 1, |
| 91 | + "Daily": true, |
103 | 92 | "At": { |
| 93 | + "Day": 30, |
| 94 | + "Second": 0, |
104 | 95 | "Year": 1999, |
105 | | - "Hour": 10, |
106 | 96 | "Minute": 0, |
107 | | - "Second": 0, |
108 | | - "Day": 30, |
| 97 | + "Hour": 10, |
109 | 98 | "Month": 11 |
110 | | - }, |
111 | | - "Daily": true, |
112 | | - "DaysInterval": 1 |
| 99 | + } |
113 | 100 | }, |
114 | 101 | { |
| 102 | + "DaysInterval": 1, |
| 103 | + "Daily": true, |
115 | 104 | "At": { |
| 105 | + "Day": 30, |
| 106 | + "Second": 0, |
116 | 107 | "Year": 1999, |
117 | | - "Hour": 14, |
118 | 108 | "Minute": 0, |
119 | | - "Second": 0, |
120 | | - "Day": 30, |
| 109 | + "Hour": 14, |
121 | 110 | "Month": 11 |
122 | | - }, |
123 | | - "Daily": true, |
124 | | - "DaysInterval": 1 |
| 111 | + } |
125 | 112 | }, |
126 | 113 | { |
| 114 | + "DaysInterval": 1, |
| 115 | + "Daily": true, |
127 | 116 | "At": { |
| 117 | + "Day": 30, |
| 118 | + "Second": 0, |
128 | 119 | "Year": 1999, |
129 | | - "Hour": 18, |
130 | 120 | "Minute": 0, |
131 | | - "Second": 0, |
132 | | - "Day": 30, |
| 121 | + "Hour": 18, |
133 | 122 | "Month": 11 |
134 | | - }, |
135 | | - "Daily": true, |
136 | | - "DaysInterval": 1 |
| 123 | + } |
137 | 124 | }, |
138 | 125 | { |
| 126 | + "DaysInterval": 1, |
| 127 | + "Daily": true, |
139 | 128 | "At": { |
| 129 | + "Day": 30, |
| 130 | + "Second": 0, |
140 | 131 | "Year": 1999, |
141 | | - "Hour": 22, |
142 | 132 | "Minute": 0, |
143 | | - "Second": 0, |
144 | | - "Day": 30, |
| 133 | + "Hour": 22, |
145 | 134 | "Month": 11 |
146 | | - }, |
147 | | - "Daily": true, |
148 | | - "DaysInterval": 1 |
| 135 | + } |
| 136 | + } |
| 137 | + ], |
| 138 | + "Action": [ |
| 139 | + { |
| 140 | + "Execute": "powershell", |
| 141 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-3-1)\\\"\"" |
| 142 | + }, |
| 143 | + { |
| 144 | + "Execute": "powershell", |
| 145 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-3-2)\\\"\"" |
| 146 | + }, |
| 147 | + { |
| 148 | + "Execute": "powershell", |
| 149 | + "Argument": "-NonInteractive -NoProfile -NoLogo -Command \"New-Item \\\"$env:TEMP\\$(Get-Date -UFormat .%s-3-3)\\\"\"" |
149 | 150 | } |
150 | 151 | ], |
151 | | - "Settings": { |
152 | | - "DontStopIfGoingOnBatteries": true, |
153 | | - "Disable": false, |
154 | | - "AllowStartIfOnBatteries": true |
155 | | - }, |
156 | 152 | "Principal": { |
157 | | - "UserId": "myusername", |
158 | 153 | "LogonType": "S4U", |
| 154 | + "UserId": "myusername", |
159 | 155 | "RunLevel": "Highest" |
160 | 156 | }, |
161 | | - "TaskPath": "\\MyTaskFolder\\" |
| 157 | + "Settings": { |
| 158 | + "Disable": false, |
| 159 | + "DontStopIfGoingOnBatteries": true, |
| 160 | + "AllowStartIfOnBatteries": true |
| 161 | + } |
162 | 162 | } |
163 | 163 | ] |
0 commit comments