[Win32utils-devel] win32-taskscheduler ole branch

Heesob Park phasis at gmail.com
Tue Sep 3 01:40:03 UTC 2013


Hi,

2013/9/3 Daniel Berger <djberg96 at gmail.com>:
> 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?
>
The error is due to invalid trig.EndBoundary value.
I made a commit to fix this error.

Regards,
Park Heesob


More information about the win32utils-devel mailing list