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

scheduled_task : Cannot configure a scheduled task with two "." in the name.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Won't Fix
    • None
    • None
    • None
    • Hide

      If tickets result from the repro, they should be filed in 0.4 epic.

      Show
      If tickets result from the repro, they should be filed in 0.4 epic.
    • Windows
    • 1
    • Windows 2018-07-05, Windows 2018-07-11
    • Needs Assessment

    Description

      Environment: Windows Server 2008 R2 Standard x64
      Puppet Agent: 3.7.2

      Example that does not work: `Prefix.ApplicationName.Suffix`.
      Example does work: `Prefix.ApplicationName_Suffix`.

      Both do work if manually created via the Task Scheduler GUI. There seems to be no name validation for tasks. Is this a bug of the Windows Task scheduler API that Ruby is using or something that Puppet should validate?

      We have a naming convention that applies to applications deployed where we use a Prefix for everything to identify a certain range of products and a Suffix for things such as Locale or Versions.

      Works:

      scheduled_task { "${prefix}.${application}_${suffix}":
          ensure      => present,
          enabled     => true,
          command     => $command,
          arguments   => $arguments,
          working_dir => $working_directory,
          trigger     => {
            schedule   => daily,
            every      => 1,
            start_date => '2016-01-01',
            start_time => $start_time
          }
      }
      

      Does not work:

      scheduled_task { "${prefix}.${application}.${suffix}":
          ensure      => present,
          enabled     => true,
          command     => $command,
          arguments   => $arguments,
          working_dir => $working_directory,
          trigger     => {
            schedule   => daily,
            every      => 1,
            start_date => '2016-01-01',
            start_time => $start_time
          }
      }
      

      Error output from Puppet Agent after running puppet apply:

      Error: Failed to call #<Win32::TaskScheduler::COM::TaskScheduler:0x000000063809e0>::NewWorkItem with HRESULT: -2147024809.:  The parameter is incorrect.
      Error: /Stage[main]/Profiles::Application::Service/Scheduled_task[Prefix.Application.Suffix]/ensure: change from absent to present failed: Failed to call #<Win32::TaskScheduler::COM::TaskScheduler:0x000000063809e0>::NewWorkItem with HRESULT: -2147024809.:  The parameter is incorrect.
      

      Attachments

        Activity

          People

            william.hurt William Hurt
            pjmagee Patrick Magee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support