Win32 taskscheduler setup

Is there a way to specify multiple schedules when setting up a task?

I’d like to do something such as this:

“trigger_type” => TaskScheduler::ON_IDLE & AT_LOGON

Also, I just heard that a Ruby Win32 is underway. That’s going to be
very nice. Looking forward to buying a copy!

Hi,

“trigger_type” => TaskScheduler::ON_IDLE & AT_LOGON

Also, I just heard that a Ruby Win32 is underway. That’s going to be very
nice. Looking forward to buying a copy!

You can add multiple triggers like this:

trigger1 = {
“start_year” => 1,
“start_month” => 1,
“start_day” => 1,
“trigger_type” => TaskScheduler::ON_IDLE
}
trigger2 = {
“start_year” => 1,
“start_month” => 1,
“start_day” => 1,
“trigger_type” => TaskScheduler::AT_LOGON
}

ts = TaskScheduler.new
ts.new_work_item(“foo”,nil)
ts.application_name = “notepad.exe”
ts.trigger=trigger1
ts.trigger=trigger2
ts.save

A little weird, but it works for the current version.

Regards,

Park H.

rtilley wrote:

Also, I just heard that a Ruby Win32 is underway. That’s going to be
very nice. Looking forward to buying a copy!

Ruby Win32 book that is!