当尝试将计划触发器从每月的工作日时间表切换到按日期的时间表时,我收到一条错误消息,说在创建基于日期的每月触发器时可以指定“ day_of_week”或“ which_occurrence”。
但是,我没有在新配置中使用这两个属性。
Error: Neither 'day_of_week' nor 'which_occurrence' can be specified when creating a monthly date-based trigger
Error: /Stage[main]/Windowsupdate::Config/Scheduled_task[Run Windows Update]/trigger: change from [
{
'schedule' => 'monthly',
'months' => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
'which_occurrence' => 'second',
'day_of_week' => ['saturday'],
'start_date' => '2018-8-7',
'start_time' => '13:15',
'enabled' => true,
'minutes_interval' => 80,
'minutes_duration' => 560,
'index' => 0
}] to [
{
'schedule' => 'monthly',
'start_time' => '13:15',
'months' => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
'on' => 15,
'minutes_interval' => '80',
'minutes_duration' => '560'
}] failed: Neither 'day_of_week' nor 'which_occurrence' can be specified when creating a monthly date-based trigger
答案 0 :(得分:1)
这似乎是Scheduled_task模块中的错误。当我删除现有任务并再次运行代码时,它可以毫无问题地应用。