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

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: scheduled_task
    • Labels:
      None
    • Template:
    • Team:
      Windows
    • Story Points:
      1
    • Sprint:
      Windows Kanban

      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

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

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support