Solved

add job to Windows Scheduler

Posted on 2004-09-04
9
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Accepted Solution

by:
realrael earned 84 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 83 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 83 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 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