Module Version: 1.0.0
Puppet Version: Server 5.x and later
OS Name/Version: N/A
Using types from puppetlabs-scheduled_task succeeds when running Puppet Server 5.x.
Catalog compilation fails with a "syntax error, unexpected tLABEL" error.
Customer running PE 2016.4.3:
A similar problem will occur when puppetserver 5.x tries to compile a catalog with a scheduled_task resource, because puppetserver 5.x contains JRuby 1.7, but it is only compatible with MRI Ruby 1.9.3 language features.
The scheduled task needs to not use keyword arguments so that it can be used with puppet-agent 1.10.x and puppetserver 5.x.
I'd strongly recommend we fix the issue in the module, as there are plenty of opensource users on Puppet5 that could run into this issue. The module metadata also claims to support Puppet >= 4.9 which is not strictly true.
Prior to Puppet6, the scheduled task type and provider were in core puppet, and it called Windows task scheduler v1 API (supported on 2003 and up). The module supports the task scheduler v2 API (available in 2008 and up, maybe Vista too). In Puppet 6, we extracted the the T&P from core puppet and moved it into the module. I expect you'll only see this issue for customers that explicitly install the scheduled_task module, and are running on a Puppet infrastructure that still uses JRuby 1.7.
This also affects puppet generate types when using the module in a Ruby 1.9.3 environment: