Ask Your Question
0

Scheduled task: no implicit conversion from nil to integer

asked 2015-05-08 02:51:11 -0500

Puppet user gravatar image

I am using Puppet 3.7.1 I have code like this to add sheduled taks to Windows machines:

scheduled_task { 'Weekly task':
                    ensure    => present,
                    enabled   => true,
                    command   => "Do it",
                    arguments => '/SILENT',
                    trigger   => {
                            every => '1',
                            schedule   => 'weekly',
                            day_of_week => ['thurs'],
                            start_date => '2015-05-07',
                            start_time => '11:11',
                    }
            }

This task worked for some time but after changing the day and time of execution it started failing with following error:

Error: no implicit conversion from nil to integer
Error: /Stage[main]/Myclass/Scheduled_task[Weekly task]/trigger: 
change from {'every' => '1', 'on' => ['thurs'], 'schedule' => 'weekly', 
'start_date' => '2015-5-7', 'start_time' => '10:10'} to [{'every' => '1', 'day_of_week' => ['thurs'],
'schedule' => 'weekly', 'start_date' => '2015-05-07', 'start_time' => '11:11'}] 
failed: no implicit conversion from nil to integer

Then reverted back to the previous settings but it still keeps giving this error. What is cause of this and how can it be fixed?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-08 04:21:19 -0500

Puppet user gravatar image

updated 2015-05-08 04:21:53 -0500

Turns out it was caused by this bug: https://tickets.puppetlabs.com/browse... Removing the trouble causing parameter start_date worked.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-08 02:51:11 -0500

Seen: 235 times

Last updated: May 08 '15