[Win32utils-devel] win32-taskscheduler and task events

Heesob Park phasis at gmail.com
Wed Jan 15 01:25:19 UTC 2014


Hi,

2014/1/15 Daniel Berger <djberg96 at gmail.com>:
> Hi,
>
> I was looking at this old issue:
>
> https://rubyforge.org/tracker/index.php?func=detail&aid=27973&group_id=85&atid=411
>
> I was trying to implement it in the ole branch simply by adding the values
> to the case statement around line 634 in taskscheduler.rb, but it doesn't
> seem to work right. It doesn't fail, it just sets the modification trigger
> type instead of what I expect.
>
> I guess the first thing that confuses me is why our values are one greater
> than the TASK_TRIGGER_TYPE enumeration. The second thing I don't understand
> is why the values for TASK_EVENT_TRIGGER_ON_IDLE,
> TASK_EVENT_TRIGGER_AT_SYSTEM_START and TASK_EVENT_TRIGGER_AT_LOGON don't
> work properly. Is it possible to support those?
>
First, our values are not just one grater than the enumeration but
used for defined Trigger.Type property.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383978(v=vs.85).aspx

Second, what is your added code?
The proper code is like this:

when TASK_EVENT_TRIGGER_ON_IDLE
        type = 6
when TASK_EVENT_TRIGGER_AT_SYSTEM_START
        type = 8
when TASK_EVENT_TRIGGER_AT_LOGON
        type = 9


Regards,
Park Heesob


More information about the win32utils-devel mailing list