[Win32utils-devel] Implementing a TaskScheduler#exists? method

Heesob Park phasis at gmail.com
Wed Jun 17 00:56:24 EDT 2009


2009/6/17 Daniel Berger <djberg96 at gmail.com>:
>
>
>> -----Original Message-----
>> From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-devel-
>> bounces at rubyforge.org] On Behalf Of Luis Lavena
>> Sent: Tuesday, June 16, 2009 9:55 PM
>> To: Development and ideas for win32utils projects
>> Subject: Re: [Win32utils-devel] Implementing a TaskScheduler#exists?
>> method
>>
>> On Wed, Jun 17, 2009 at 12:15 AM, Daniel Berger<djberg96 at gmail.com>
>> wrote:
>> >
>> >
>> >> -----Original Message-----
>> >> [...]
>> >> I think the best way to check taskscheduler item is just go to the
>> >> Scheduled Tasks folder (in most case c:\winodws\tasks) and see the
>> >> .job files.
>> >>
>> >> You can write it with ruby like this:
>> >>
>> >> def TaskScheduler#exists?(work_item)
>> >>   File.exist?("#{ENV['windir']}\\Tasks\\#{work_item}.job")
>> >> end
>> >
>> > That will work, though I don't think it's a requirement that the .job
>> file
>> > live there, is it?
>>
>> Well, on Windows 7 and Vista only list 2 job files for me, and are
>> google related.
>>
>> On Windows 7 there is SchTasks which list *lot* of tasks not covered
>> by Windows\Tasks folder.
>
> On my Vista Home Premium laptop I only see a single file called SCHEDLGU.TXT
> under C:\Windows\Tasks. It appears to be nothing more than a record of the
> Task Scheduler Service.
>
It's in C:\Windows\System32\Tasks folder without .job extension.

Regards,

Park Heesob


More information about the win32utils-devel mailing list