Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-6398

scheduled_task : Confusing error message displayed when using incorrect value with scheduled_task resource

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Done
    • None
    • None
    • scheduled_task
    • None

    Description

      I recently used a scheduled_task resource and coded the trigger section incorrectly like so:

      scheduled_task { 'defrag C':
        ensure => present,
        enabled => true,
        command => 'C:\windows\system32\defrag.exe',
        arguments => 'C:',
        trigger   => {
          schedule => 'weekly',
          start_time => '01:00',
          start_time => '01:00',
          day_of_week => 'Sun',
        }
      }
      

      The documentation specifies that values of "day_of_week" should be a lowercased string, but when the "Sun" value was used, Puppet emitted the somewhat confusing error message:

      Cannot convert "nil" to Fixnum
      

      Can the error message be improved to refer to the incorrect value somehow to make it easier to find the problem and fix it?

      Attachments

        Activity

          People

            glenn.sarti Glenn Sarti
            greg.larkin Greg Larkin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support