[Win32utils-devel] Can't get TaskScheduler.new to work for 0.3.0

Daniel Berger djberg96 at gmail.com
Sun Feb 21 22:08:28 EST 2010


Hi,

Ruby 1.8.6 mingw
Windows 7 Ultimate

Just playing with the ole branch for win32-taskscheduler, but I can't
get it to work. I tried this:

$:.unshift 'lib'
require 'rubygems'
require 'win32/taskscheduler'
include Win32

task = 'test_delete_me'

trigger = {
  'start_year'   => Time.now.year + 1,
  'start_month'  => 4,
  'start_day'    => 1,
  'start_hour'   => 7,
  'start_minute' => 14,
  'trigger_type' => TaskScheduler::DAILY,
  'type'         => { 'days_interval' => 1 }
}

ts = TaskScheduler.new
ts.new_work_item(@task, @trigger)
ts.activate(@task)

But that resulted in this error from RegisterTaskDefinition in new_work_item:

HRESULT error code:0x80020009

Any ideas?

Thanks,

Dan


More information about the win32utils-devel mailing list