win32-taskscheduler 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/RELEASE_NOTES.md +3 -25
- data/lib/win32/taskscheduler.rb +9 -8
- data/win32-taskscheduler.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ff3a43dafb7ff9ee7e58d978504617b0471a91
|
4
|
+
data.tar.gz: f16c3ffefa541e50f18fa26b9c619983301bdda4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7718cccd0ba64c718a934baff87548daf795b73e60e7ebf76a8facae87fc22268d7cc4327936cc5ef52aff1ade706569feb1ce0b9ef714b1bc5388bfbfe1777
|
7
|
+
data.tar.gz: 5f846acefbd0ca2b69c5ceafae1b9db98e6ff0e0d8509e33ff0ae4cd5dc03723f497dd637cf25634dd8ce54961362462b52e639bda1004eb2393b4a245ad7eae
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [v0.4.1](https://github.com/chef/win32-taskscheduler/tree/win32-taskscheduler-0.4.1) (15-May-2018)
|
2
|
+
- Fix the issue of "no mapping" while creating Windows task for SYSTEM USERS. [#30](https://github.com/chef/win32-taskscheduler/pull/30) ([#NAshwini](https://github.com/NAshwini))
|
3
|
+
- Fix for not to set start time if not set if its 0000-00-00T00:00:00 [#29][(https://github.com/chef/win32-taskscheduler/pull/29) ([#Vasu1105](https://github.com/Vasu1105))
|
4
|
+
|
1
5
|
## [v0.4.0](https://github.com/chef/win32-taskscheduler/tree/win32-taskscheduler-0.4.0) (5-Apr-2018)
|
2
6
|
- Updated code to create task without trigger. [#25](https://github.com/chef/win32-taskscheduler/pull/25) ([#Vasu1105](https://github.com/Vasu1105))
|
3
7
|
- Fix for execution time limit and weeks of month. [#23](https://github.com/chef/win32-taskscheduler/pull/23) ([#Vasu1105](https://github.com/Vasu1105))
|
data/RELEASE_NOTES.md
CHANGED
@@ -7,30 +7,8 @@ Example Note:
|
|
7
7
|
Details about the thing that changed that needs to get included in the Release Notes in markdown.
|
8
8
|
-->
|
9
9
|
|
10
|
-
# win32-taskscheduler 0.4.
|
11
|
-
In this release we have fixed
|
10
|
+
# win32-taskscheduler 0.4.1 release notes:
|
11
|
+
In this release we have fixed issue as below:
|
12
12
|
|
13
|
-
|
14
|
-
Returns current active task with given name.
|
13
|
+
-- Fix the issue of "no mapping" while creating Windows task for SYSTEM USERS. [Issue: https://github.com/chef/chef/issues/7227]
|
15
14
|
|
16
|
-
`configure_principals`
|
17
|
-
Sets the principals for current active task. The principal is hash with following possible options.
|
18
|
-
Expected principal hash: { id: STRING, display_name: STRING, user_id: STRING, logon_type: INTEGER, group_id: STRING, run_level: INTEGER }
|
19
|
-
|
20
|
-
'principals'
|
21
|
-
Returns a hash containing all the principal information of the current task.
|
22
|
-
|
23
|
-
`execution_time_limit`
|
24
|
-
Returns execution time limit for current active task.
|
25
|
-
|
26
|
-
`settings`
|
27
|
-
Returns a hash containing all settings of the current task.
|
28
|
-
|
29
|
-
`idle_settings`
|
30
|
-
Returns a hash of idle settings of the current task.
|
31
|
-
|
32
|
-
`network_settings`
|
33
|
-
Returns a hash of network settings of the current task.
|
34
|
-
|
35
|
-
'enabled?'
|
36
|
-
Returns true if current task is enabled
|
data/lib/win32/taskscheduler.rb
CHANGED
@@ -16,7 +16,7 @@ module Win32
|
|
16
16
|
include Windows::TaskSchedulerConstants
|
17
17
|
|
18
18
|
# The version of the win32-taskscheduler library
|
19
|
-
VERSION = '0.4.
|
19
|
+
VERSION = '0.4.1'.freeze
|
20
20
|
|
21
21
|
# The Error class is typically raised if any TaskScheduler methods fail.
|
22
22
|
class Error < StandardError; end
|
@@ -522,7 +522,7 @@ module Win32
|
|
522
522
|
|
523
523
|
trig = taskDefinition.Triggers.Create(trigger[:trigger_type].to_i)
|
524
524
|
trig.Id = "RegistrationTriggerId#{taskDefinition.Triggers.Count}"
|
525
|
-
trig.StartBoundary = startTime
|
525
|
+
trig.StartBoundary = startTime if startTime != '0000-00-00T00:00:00'
|
526
526
|
trig.EndBoundary = endTime if endTime != '0000-00-00T00:00:00'
|
527
527
|
trig.Enabled = true
|
528
528
|
|
@@ -580,15 +580,16 @@ module Win32
|
|
580
580
|
|
581
581
|
act = taskDefinition.Actions.Create(0)
|
582
582
|
act.Path = 'cmd'
|
583
|
+
user = taskDefinition.Principal.UserId
|
583
584
|
|
584
585
|
begin
|
585
586
|
@task = @root.RegisterTaskDefinition(
|
586
587
|
task,
|
587
588
|
taskDefinition,
|
588
589
|
TASK_CREATE_OR_UPDATE,
|
589
|
-
|
590
|
-
|
591
|
-
|
590
|
+
user.empty? ? 'SYSTEM' : user,
|
591
|
+
@password,
|
592
|
+
@password ? TASK_LOGON_PASSWORD : TASK_LOGON_SERVICE_ACCOUNT
|
592
593
|
)
|
593
594
|
rescue WIN32OLERuntimeError => err
|
594
595
|
raise Error, ole_error('RegisterTaskDefinition', err)
|
@@ -760,7 +761,7 @@ module Win32
|
|
760
761
|
|
761
762
|
trig = definition.Triggers.Create( trigger[:trigger_type].to_i )
|
762
763
|
trig.Id = "RegistrationTriggerId#{definition.Triggers.Count}"
|
763
|
-
trig.StartBoundary = startTime
|
764
|
+
trig.StartBoundary = startTime if startTime != '0000-00-00T00:00:00'
|
764
765
|
trig.EndBoundary = endTime if endTime != '0000-00-00T00:00:00'
|
765
766
|
trig.Enabled = true
|
766
767
|
|
@@ -852,7 +853,7 @@ module Win32
|
|
852
853
|
|
853
854
|
trig = definition.Triggers.Create( trigger[:trigger_type].to_i )
|
854
855
|
trig.Id = "RegistrationTriggerId#{definition.Triggers.Count}"
|
855
|
-
trig.StartBoundary = startTime
|
856
|
+
trig.StartBoundary = startTime if startTime != '0000-00-00T00:00:00'
|
856
857
|
trig.EndBoundary = endTime if endTime != '0000-00-00T00:00:00'
|
857
858
|
trig.Enabled = true
|
858
859
|
|
@@ -1313,7 +1314,7 @@ module Win32
|
|
1313
1314
|
TASK_CREATE_OR_UPDATE,
|
1314
1315
|
user,
|
1315
1316
|
@password,
|
1316
|
-
@password ? TASK_LOGON_PASSWORD :
|
1317
|
+
@password ? TASK_LOGON_PASSWORD : TASK_LOGON_SERVICE_ACCOUNT
|
1317
1318
|
)
|
1318
1319
|
rescue WIN32OLERuntimeError => err
|
1319
1320
|
method_name = caller_locations(1,1)[0].label
|
data/win32-taskscheduler.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-taskscheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Park Heesob
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|