Link to home
Start Free TrialLog in
Avatar of Sjef Bosman
Sjef BosmanFlag for France

asked on

Does the standard Win98 Task Scheduler have a COM interface?

I want to address the Win98 Task Scheduler, if possible using CreateObject from VB. Does it have a COM-interface, and, if it has one, how to call the various functions or objects??
SOLUTION
Avatar of dhsindy
dhsindy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sjef Bosman

ASKER

Great, thank you! Under Properties, I found:
    C:\WINDOWS\EXPLORER.EXE ,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}

On the Internet, I found some info on CreateObject("Scheduler.SchedulingAgent.1"), but that seems to be for the NT environment with a separate scheduling server process.

Let me try some objects, but I expect that VB objects ;)

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
My goodness! Thanks a lot you both.

> this is where my knowledge of Windows programming dwindles out

I think I'll place an additional question in the VB area, to attract VB specialists. I chose this section, because they might be distracted into discussing the NT or above Scheduler, which I don't have. I'll up the points to 300, to be able to reward  everybody.
Ah, forgot. The quote "this is where my knowledge of Windows programming dwindles out", I wish I could say the same... ;)
Not sure if you are aware of this, but there are several utilities that can be used through the Windows "System Agent".  The basic principle, in applying this to eg. disk cleanup (CLEANMGR.EXE) is as follows:

Start Menu > RUN > and type the following command > click OK

CLEANMGR /d C:\ /sageset:1

Set the configuration options for that utility.  Here the /d switch tells cleanmgr.exe to delete the files as it will now have been configured (I don't think this switch is strictly necessary in Win98), and to act on the C:\ Drive.

This creates a setting that can be a number from 1 to 65,535, and can be recalled using the command:

CLEANMGR  /sagerun:1

The System Agent settings are stored in the key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Plus!\System Agent
but there are only a handful of program files (to my knowledge) that are "System Agent-Aware" in Win98:

CMPAGENT.EXE - Compression Agent (linked with Drivespace3)
CLEANMGR.EXE - as detailed previously
DEFRAG.EXE - Disk Defragmenter
DISKALM.EXE - Low Disk Space notifier (linked with Cmpagent, CleanMgr and Drivespace3)
SCANDSKW.EXE - Windows Scandisk

The SAGERUN number and actions are stored under a sub-key named "Setx" where x is the number chosen with the sageSET process.  I think "Set53" is the default number chosen by Windows.

If you think this is off-topic, then let me explain.  All of these actions can be scheduled via the Windows Task Scheduler by creating a new shortcut somewhere with the COMMAND as your sageRUN command line, and then using Task Scheduler to use that shortcut to run the task.

As I say, I would have no idea how to write a VB Script that would perform something like this and the only reason I have thrown this into the ring is in case it gives you another angle to consider IF you need task scheduler for one of these mundane tasks OR if you can ascertain if the task YOU are tring to do is "System Agent-Aware".

Just thinking out loud here I suppose :-)


I can really appreciate "loud thinkers" :)  The info you gave is definitely new to me, if I can find some time I'll look into it.

What I was really looking for? It all has to do with a way to activate a Notes client functionality at certain times, without using Busy-wait-agents. I managed to put an activation for the Notes client in, it is set to run every day at 18:00. Upon activation, Notes will show the weekly worksheet application. That's what works.

No I have a different application, I which I would like to manage the activation moments in the database itself. I want an external clock mechanism to fire the Notes client whenever necessary. Just an example: I'd like to send a mail at 12:34 exactly, so I need an action in the Scheduler to activate Notes at 12:34.

;) I don't need the advice to switch to Outl**k or Excharge, nor to create a separate application to do this. The Notes language LotusScript is VB-alike and it has the CreateObject call, so things should be doable from Notes. If only Win98 were a bit more cooperative...
On the subject of "an external clock mechanism", I don't suppose you will have seen a tiny utility by a guy named Eric Phelps.

http://www.ericphelps.com/

http://www.ericphelps.com/schedule/index.htm
Written in VB 5 written before Windows had a decent Task Scheduler, but has the benefit that it is a tiny file and doesn't run with an interface - it uses a preset .INI file containing the settings.
http://www.ericphelps.com/schedule/schedule.zip

Notes, which I believe only refer to NT-based systems:

"If you use the AT command, all your tasks run as SYSTEM and can't access the network. If you use the "tasks" GUI to schedule your tasks, you have to enter your username and password for every task -- every time you change your password. So... Use the tasks GUI to run MY schedule program, and let my schedule program start everything else! That way you only have one username/password task to change. If you set the schedule task in the GUI to run on startup, it's as good as being a service".

Other useful pieces of info on the Eric Phelps pages:

http://www.ericphelps.com/scripting/samples/index.htm
(Section Header "Run Other Programs")

http://www.ericphelps.com/scripting/samples/Schedule/index.html
http://www.ericphelps.com/scripting/samples/Schedule/readme.txt

Another very flexible-looking Scheduler:

VisualCron
http://www.visualcron.com/#

VisualCron is windowsbased program that works like the integrated task scheduler but have more features and flexibility. VisualCron is based on the Unix/Linux version of cron.

Features:
http://www.visualcron.com/features.php
Screenshots:
http://www.visualcron.com/screenshots.php
Download:
http://www.visualcron.com/download.php
Win98/ME Issues Resolved:
http://www.visualcron.com/support.php#w98
Help! Whoah! Stop! Drowning :) This is great info, I'll have to delve through this... It would have been nice to do it without additional programs, but, as so often with Windows, that's an illusion. It's a virus system, it gets bigger every release.

Essential requirements:
- scheduler
- can start Lotus Notes client
- has COM interface

PS Read your profile... One of my favourite sites, probably you know it already: http://www.scottish.parliament.uk/home.htm
Following your recommendations...

Thanks both!
Thank you, sjef_bosman and LeeTutor
Hi Bill,

I'm sorry I left the question open that long. I hoped someone would give me exactly the code I needed. I still haven't found the right moment to pick this up again. If ever I have the solution, I'll add it here.

Sjef