win32-taskscheduler 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '08691b264f7dbe39c37043d65f3765f5949304c3'
4
- data.tar.gz: 5247b4be4cf39cefcecb19c795e0dc158bf44ba1
3
+ metadata.gz: 75ff3a43dafb7ff9ee7e58d978504617b0471a91
4
+ data.tar.gz: f16c3ffefa541e50f18fa26b9c619983301bdda4
5
5
  SHA512:
6
- metadata.gz: 9394becf37fc16d9fcff57728826f90388c94455f7fd082a5a86ccc87b04d319bf4835266d5119ff508daeed708abee096d49ee07e8ed69ea3e549830d8bf383
7
- data.tar.gz: c59df6ee9dc73f263744e0464fdf1031277f66d85601b009995b913fcbb9cdcff10cc6fb41cf78b95ab8d2415b4483716c805b09438a4cd6ae567667355730c0
6
+ metadata.gz: d7718cccd0ba64c718a934baff87548daf795b73e60e7ebf76a8facae87fc22268d7cc4327936cc5ef52aff1ade706569feb1ce0b9ef714b1bc5388bfbfe1777
7
+ data.tar.gz: 5f846acefbd0ca2b69c5ceafae1b9db98e6ff0e0d8509e33ff0ae4cd5dc03723f497dd637cf25634dd8ce54961362462b52e639bda1004eb2393b4a245ad7eae
@@ -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))
@@ -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.0 release notes:
11
- In this release we have fixed some issues and added following methods.
10
+ # win32-taskscheduler 0.4.1 release notes:
11
+ In this release we have fixed issue as below:
12
12
 
13
- `get_task`
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
@@ -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.0'.freeze
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
- nil,
590
- nil,
591
- TASK_LOGON_INTERACTIVE_TOKEN
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 : TASK_LOGON_INTERACTIVE_TOKEN
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
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-taskscheduler'
5
- spec.version = '0.4.0'
5
+ spec.version = '0.4.1'
6
6
  spec.authors = ['Park Heesob', 'Daniel J. Berger']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
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.0
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-04-05 00:00:00.000000000 Z
12
+ date: 2018-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi