0

Hello,

Can i know if it is possible to show/ display windows task scheduler information such as:

1) process status -> if it is running or stopped
2) time the scheduler starts
and other related info... on vb

i've beeeen searching for the sources on yahoo and google... yet still no results...

::all i want is to read the information from the scheduler on vb


thank you.

2
Contributors
7
Replies
8
Views
10 Years
Discussion Span
Last Post by Comatose
0

Depends! Are you talking about Scheduled Tasks (clicking start, going to programs, accessories, system tools, Scheduled Tasks) or something like the AT tool, that uses the WMI Class?

0

Depends! Are you talking about Scheduled Tasks (clicking start, going to programs, accessories, system tools, Scheduled Tasks) or something like the AT tool, that uses the WMI Class?

sorry, i didnt explain clearly
i want to use vb to get the scheduler information and display them on asp page. is it possible??

0

Yes, but that still doesn't answer my question. There are 2 different ways to add tasks in XP..... 1 is by clicking start, going to programs, accessories, system tools, and clicking scheduled Tasks..... that requires a different means than if you used some other program, or if the WMI class was used......
so which is it?

0

Yes, but that still doesn't answer my question. There are 2 different ways to add tasks in XP..... 1 is by clicking start, going to programs, accessories, system tools, and clicking task scheduler..... that requires a different means than if you used some other program, or if the WMI class was used......
so which is it?

ops...sorry.
wmi class

0

List Processes

strComputer = "."
Set objWMIService = GetObject("winmgmts:"     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colScheduledJobs = objWMIService.ExecQuery     ("Select * from Win32_ScheduledJob")

For Each objJob in colScheduledJobs
    Wscript.Echo "Caption: " & objJob.Caption
    Wscript.Echo "Command: " & objJob.Command
    Wscript.Echo "Days of Month: " & objJob.DaysOfMonth
    Wscript.Echo "Days of Week: " & objJob.DaysOfWeek
    Wscript.Echo "Description: " & objJob.Description
    Wscript.Echo "Elapsed Time: " & objJob.ElapsedTime
    Wscript.Echo "Install Date: " & objJob.InstallDate
    Wscript.Echo "Interact with Desktop: " & objJob.InteractWithDesktop
    Wscript.Echo "Job ID: " & objJob.JobID
    Wscript.Echo "Job Status: " & objJob.JobStatus
    Wscript.Echo "Name: " & objJob.Name
    Wscript.Echo "Notify: " & objJob.Notify
    Wscript.Echo "Owner: " & objJob.Owner
    Wscript.Echo "Priority: " & objJob.Priority
    Wscript.Echo "Run Repeatedly: " & objJob.RunRepeatedly
    Wscript.Echo "Start Time: " & objJob.StartTime
    Wscript.Echo "Status: " & objJob.Status
    Wscript.Echo "Time Submitted: " & objJob.TimeSubmitted
    Wscript.Echo "Until Time: " & objJob.UntilTime
Next

Enumerate List (Same As Above): http://www.cruto.com/resources/vbscript/vbscript-examples/os/tasks/List-Scheduled-Tasks.asp
Create: http://www.cruto.com/resources/vbscript/vbscript-examples/os/tasks/Create-a-Scheduled-Task.asp
Delete: http://www.cruto.com/resources/vbscript/vbscript-examples/os/tasks/Delete-a-Scheduled-Task.asp
Delete All: http://www.cruto.com/resources/vbscript/vbscript-examples/os/tasks/Delete-All-Scheduled-Tasks.asp

0

Sorry for the late reply (busy nowadays)

i've been looking through the codes, i find that there is a problem for this coding, where :

need to use the program to create the task scheduler, then the program can read the information. (get what i mean?)

but if i already created the task in my computer and i use this program to read....it failed to do so...

However, i've researched some on this topic, but not sure if it is working.
B4 I used kernel.dll to read and to do something funny on my pc, How if i use the scheduler dll to read the information as well?
Will it works?

thank you

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.