META-Schedule for Windows NT

Introduction

This Windows NT service has been written to complete (or enterly replace!) the "Planning" service provided by Microsoft with programming with "AT" command (in a DOS window). META-Schedule has the following advantages :

Knowns Bugs & newbies

Version 1.3.0

Version 1.2.2

Version 1.2

Version 1.1

Version 1.0

Installation

The installation can be made through the normal programs like SC.EXE (available in the NT Ressource Kit of Microsoft) or, much easier, by the program MSchedule.exe itself.

To install the scheduler, make a directory, copy the file and type: mschedule --install in a DOS window. In the same directory, you must write the configuration file mschedule.ini wich includes the commands to schedule.

To install more than a instance of the program, type: mschedule --install <file> where <file> is the configuration file <file>.ini wich must be in the same directory than the file mschedule.exe.

Note: Configuration files must be in the same directory than the main program (not in the Windows directory!).

Command list

Extern

Like a "AT" command, this command launch external programs. If it is a internal command (DEL, TYPE...), use the command interpreter (CMD).
You can specify a maximum time to run, after this time, the external program will be automatically destroyed.
External commands enables environnement variables extension. The use of %windir% will be replaced by the Windows directory (C:\WINNT by default).

[Backup]
CMD=Extern
Program=PKZIP25 -add %windir%\*.* D:\win_nt.zip
AT=10 1 * * 1-5
Priority=Normal

Specified priority is intended to the external program, i.e. the priority of the new program will be set by the scheduler himself.

DiskFree

Checks the available space disk. A mail is send if the space is lower than the specified quotas. You can check network drives if the user specified for the service has the corrects rights.

Note: if you activate the quotas on Windows 2000, the free space returned can be false.

[SpaceOnDisk]
CMD=DiskFree
C:\=50M
D:\=300K
AT=0 * * * *


This example checks the free disk space every hour on the C: drive (must remain 50Mb) and D:\ (must be remain more than 300Ko).

Service

One of the most interesting option is the scheduling of NT services. The test is automatically made at the start of the service, and a service can be maintened running at special hours. Arguments are the following:

[WebServer]
CMD=Service
NAME=W3Svc
PhysicalCheck=TRUE
AT=* * * * *

This example above shows how to force the IIS4 server to run everytime. If somebody stops it for any reason, it will restart in the next seconds.

ErrorFile

This commands checks a file and if the file exists, the scheduler transfers it by mail and then delete it.
If no file is specified (item File), it's the Dr WATSON (drwtsn32.log in the Windows directory) wich is taken. This command permits to checks when a program crashes.

[COREDUMP]
CMD=ErrorFile
AT=* * * * *

or:

[ERROR_TOTO]
CMD=ErrorFile
File=%windir%\toto.err
AT=* * * * *

Copy

This command makes a file copy. The source file can be on the machine or on a network driver or on a distant server (HTTP, HTTPS ou FTP).
If the file has a .gz, it will be uncompressed automatically if it is the source or compressed if it is the destination. It's important to note that the file is putted in memory before copied on the local disk.
This function is specially used to optimize dynamic HTML pages in a static version.

Note: the source file and the destination can use expanded variables.

[PAGE_GARDE]
CMD=COPY
Source=http://www.videotruc.com/
Dest=c:\inetpub\wwwroot\index_video.htm
AT=1 * * * *

WEBSERVER

Enables a WEB server to check performances. In new versions, it will be possible to configure on-line.

[Informations]
CMD=WebServer
Port=8088
AT=* * * * *

This example enables the WEBSERVER 24/7. Use a browser to known how many time is spent in programs (in CPU times and real times).

Reboot

Not very useful. The following example tries to reboot your machine at 0h00 the first day of the new year! This command is available for tests purpose only.

[Security]
CMD=REBOOT
AT=0 0 1 1 *

 

TimeSync

This command permit to synchronize the local clock with NTP servers. If no server is specified, the scheduler will use a predefined list.
For maximal security, the time synchronization will NOT be done if your server has a difference of less than 2 seconds with the NTP server. Same way, if the synchronization is more than an hour, no synchronization will be done. To optimize the security, the scheduler will use 3 servers to synchronize (in the case of a server is not correctly set). It is not a good idea to set only one or two servers, but in this case, the synchronization is more random.
I give your this tip: synchronize your machine at 5 or 6 hour in the night (not at midnight!).

[TimeSync]
CMD=TimeSync
truechimer.waikato.ac.nz=
ntp1.arnes.si=
vtserf.cc.vt.edu=
AT=10 5 * * *

Note: This command is only available in the registred version.

FAQ

variable expansion

Expansion of variables (for the external programs) will follow the rules noted below. If the variable is an environment variable, the variable is expanded, if not, the following variables are always availables:

Notes:

Example: %WINDIR%\system32\toto.txt will be extended to "c:\winnt\system32\toto.txt".

Multi-threading

The scheduling service is multi-threaded. Every command is run in a separate thread (with a different priority for each).

Virtual clock

The internal clock is used as reference at the start of the program, but, to support a modification of the time, a virtual clock is used in the scheduler to be always synchronized and not forget some commands.
Example: if a command is scheduled every day at 5h30. A system administrator système modify the time from 05h25 to 5h32, the command will be correctly scheduled.

configuration section

The [Config] section specifies specific options to the scheduler. Some of them are by default.:

For each command sections, the following items can be used:

TODO list

The following things will be done:

You can send me ideas and priorities at my adress: winnix@club-internet.fr

Freeware Limitations

The service described above is limited if you are not registred. The Freeware licence limits are:

Order

You can order the key license at the following link (secure payment). Price is about 50 US dollars (depends of european currency): https://www.yaskifo.com/order.asp?VENDOR=1878&LNG=FR.

Contact

All questions must be sent to my adress: winnix@mindless.com. Thanks a lot.