[Win32utils-devel] win32-taskscheduler ole branch

Daniel Berger djberg96 at gmail.com
Mon Sep 2 16:44:40 UTC 2013

A recent bug report inspired me to go back and revisit the ole branch of
the win32-taskscheduler library.

I refactored the tests and got most of the methods working. However, a few
bugs remain. For example, I cannot create a new task. At the bottom of the
taskscheduler.rb file in the ole branch you'll see this:

  include Win32
  ts = TaskScheduler.new

  trigger = {
    :start_year   => 2015,
    :start_month  => 4,
    :start_day    => 25,
    :start_hour   => 23,
    :start_minute => 5,
    :trigger_type => TaskScheduler::MONTHLYDOW,
    :type => {
      :weeks        => TaskScheduler::FIRST_WEEK | TaskScheduler::LAST_WEEK,
      :days_of_week => TaskScheduler::MONDAY | TaskScheduler::FRIDAY,
      :months       => TaskScheduler::APRIL | TaskScheduler::MAY

  ts.new_task('foo', trigger)

However, wen I try to run it I get:

taskscheduler.rb:668:in `rescue in new_work_item': RegisterTaskDefinition:
The task XML contains a value which
 is incorrectly formatted or out of range. (Win32::TaskScheduler::Error)
        from taskscheduler.rb:658:in `new_work_item'
        from taskscheduler.rb:1235:in `<main>'

Any suggestions?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130902/f715549c/attachment.html>

More information about the win32utils-devel mailing list