Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

add job to Windows Scheduler

Posted on 2004-09-04
9
Medium Priority
?
217 Views
Last Modified: 2008-01-09
Anyone know how I can pass information to the windows scheduler to schedule a program to run?
0
Comment
Question by:xizor
6 Comments
 
LVL 3

Accepted Solution

by:
realrael earned 336 total points
ID: 11980007
0
 
LVL 3

Expert Comment

by:realrael
ID: 11980017

there are other related APIs. if you need more help, launch MSDN and search "NetScheduleJobAdd". - rael
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 332 total points
ID: 11980108
see "using task scheduler from VB" in http://www.mvps.org/emorcillo/vb6/grl/index.shtml
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Assisted Solution

by:merowinger
merowinger earned 332 total points
ID: 11989184
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ScheduledJob",,48)
For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Command: " & objItem.Command
    Wscript.Echo "DaysOfMonth: " & objItem.DaysOfMonth
    Wscript.Echo "DaysOfWeek: " & objItem.DaysOfWeek
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "ElapsedTime: " & objItem.ElapsedTime
    Wscript.Echo "InstallDate: " & objItem.InstallDate
    Wscript.Echo "InteractWithDesktop: " & objItem.InteractWithDesktop
    Wscript.Echo "JobId: " & objItem.JobId
    Wscript.Echo "JobStatus: " & objItem.JobStatus
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Notify: " & objItem.Notify
    Wscript.Echo "Owner: " & objItem.Owner
    Wscript.Echo "Priority: " & objItem.Priority
    Wscript.Echo "RunRepeatedly: " & objItem.RunRepeatedly
    Wscript.Echo "StartTime: " & objItem.StartTime
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo "TimeSubmitted: " & objItem.TimeSubmitted
    Wscript.Echo "UntilTime: " & objItem.UntilTime
Next
0
 
LVL 2

Author Comment

by:xizor
ID: 12063279
All this is great for windows NT and XP, but not for windows 98.

Does anyone know how to implement code to interface with the TaskScheduler in 98?

I couldn't work out the thing by edanmo's task scheduler.
0
 
LVL 2

Author Comment

by:xizor
ID: 12090773
anyone?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question