Solved

add job to Windows Scheduler

Posted on 2004-09-04
9
211 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month8 days, 13 hours left to enroll

617 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