Skip to content
Permalink
Browse files

Merge pull request #3754 from Iristyle/ticket/3.8/PUP-4186-backport-P…

…UP-3429-weekly-tasks-always-notify-trigger-changed

(PUP-3429) task_scheduler should use 'day_of_week' instead of 'on'
  • Loading branch information
ferventcoder committed Mar 26, 2015
2 parents 9483899 + 05118fb commit 304255e61152b366e733b72639ef87a5ba8661eb
@@ -83,9 +83,9 @@ def trigger
puppet_trigger['schedule'] = 'daily'
puppet_trigger['every'] = trigger['type']['days_interval'].to_s
when Win32::TaskScheduler::TASK_TIME_TRIGGER_WEEKLY
puppet_trigger['schedule'] = 'weekly'
puppet_trigger['every'] = trigger['type']['weeks_interval'].to_s
puppet_trigger['on'] = days_of_week_from_bitfield(trigger['type']['days_of_week'])
puppet_trigger['schedule'] = 'weekly'
puppet_trigger['every'] = trigger['type']['weeks_interval'].to_s
puppet_trigger['day_of_week'] = days_of_week_from_bitfield(trigger['type']['days_of_week'])
when Win32::TaskScheduler::TASK_TIME_TRIGGER_MONTHLYDATE
puppet_trigger['schedule'] = 'monthly'
puppet_trigger['months'] = months_from_bitfield(trigger['type']['months'])
@@ -172,13 +172,13 @@ def time_component
})

resource.provider.trigger.should == [{
'start_date' => '2011-9-12',
'start_time' => '13:20',
'schedule' => 'weekly',
'every' => '2',
'on' => ['sun', 'mon', 'wed', 'fri'],
'enabled' => true,
'index' => 0,
'start_date' => '2011-9-12',
'start_time' => '13:20',
'schedule' => 'weekly',
'every' => '2',
'day_of_week' => ['sun', 'mon', 'wed', 'fri'],
'enabled' => true,
'index' => 0,
}]
end

0 comments on commit 304255e

Please sign in to comment.
You can’t perform that action at this time.