add job to Windows Scheduler

Anyone know how I can pass information to the windows scheduler to schedule a program to run?
LVL 2
xizorAsked:
Who is Participating?
 
realraelCommented:

there are other related APIs. if you need more help, launch MSDN and search "NetScheduleJobAdd". - rael
0
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
see "using task scheduler from VB" in http://www.mvps.org/emorcillo/vb6/grl/index.shtml
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
merowingerConnect With a Mentor Commented:
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
 
xizorAuthor Commented:
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
 
xizorAuthor Commented:
anyone?
0
All Courses

From novice to tech pro — start learning today.