TechScheduler
Scheduling Solutions for Windows 95, 98 and NT
Technical Document

T001:	Description of Job Save File. 
Date:	03/03/98 rev 2.
1. Overview
The process to create a TechScheduler job save file is invoked from the main menu using the "Save Job To File" menu option. The process will extract a job from the registry and save it to an INI style file. The menu option "Load Job From File" will read this style of file and load it into the TechScheduler job list and the registry.
Other processes \ applications can create job files to be processed manually or automatically by TechScheduler. This document gives an overview of the format of the job file.
	
Each save file has 2 sections:
	a. Header - section name always [SaveFileInfo]
	b. Data body - section name is job name
Keys in the sections will always start with one of these values:
	a. s - indicates a string value
	b. i - indicates an integer value
	c. b - indicates a boolean value
2. Header Section.
There are 3 keys that must appear in the header section:
	a. sFileType - must be "TechScheduler Job List Save File"
	b. sSaveDate - Date job was saved, format yyyy-mm-dd
	c. sSaveTime - Time job was saved, format hh:mm:ss am/pm
Example:
[SaveFileInfo]
sFileType=TechScheduler Job List Save File
sSaveDate=1997-12-03
sSaveTime=8:00:04 AM
3. Data Body Section
The data body section will generally have some or all of the flags that appear in the standard job entries list below and may contain additional flags depending on the type of job.
Standard Job entries (shared by all job types )
Job Specifiers:
	sJobName			- name of the job
	iJobType			- value: 0 - 9
Calendar / Schedule Data:
	sFrequency Data			- indicates days of week to process: 1010100
	sExcl0			 	- Dates to exclude from processing, sExcl0, sExcl1...
	bHold				- value: 0=active 1=hold 2=paused
	iFrequency			- value indicating schedule frequency
	bExclDates		 	- Exclude certain dates. 0=false 1=true
	iCustomTimeType			- Use custom time. 0=no -1=demand 1-6 custom types.
	iHour				- Hour to run job. 24hr format
	iMin				- Minute to run job.
	iSec				- Second to run job
	iCustomTimeHourMin 		- Hr\Min for a custom time type
	sCustomTime0			- List times to run: sCustomTime0, sCustomTime1 ...
	bCustStartFlag	 		- Check earliest start time: 0=false 1=true
	bCustEndFlag			- Check latest start time: 0=false 1=true
	iCustStartHr			- Earliest start hour
	iCustStartMin			- Earliest start min
	iCustEndHr		 	- Latest start hour
	iCustEndMin			- Latest start min
	iRunLate=0			- minutes to allow job to be run after scheduled time 0=off >0=mins
Prestart Criteria:
	bCheckPreStart			- check prestart criteria: 1=true 0=false
	bCheckStartDir			- set starting directory: 1=true 0=false
	bCheckDiskFree			- check for disk free space: 1=true 0=false
	iDiskFreeMb=10			- amount of disk space needed in mb
	sDiskFreeDrive			- drive to check for free space
	sStartDir			- the starting directory to set to, ie: c:\windows
	bCheckFileExist			- Check to see if a file exists: 1=true 0=false
	sPreStartFile			- File to check for, ie: c:\windows\autoexec.bat
	iPreFileFlag			- 1=file must exist 0=file must not exist
Notification Criteria:
	bNotifyCode			- use notification criteria: 0=false 1=true
	iNotifyType			- type of email: 1=smtp 0=mapi
	iNotifyStarts			- notify on job start successful: 0=false 1=true
	iNotifyEnds			- notify on job end successful: 0=false 1=true
	iNotifyStartf			- notify on job start failure: 0=false 1=true
	iNotifyEndf			- notify on job end failure: 0=false 1=true
	iNotifyFailInfo			- attempt to show internal failure info: 0=false 1=true
	sNotifyMessageSuccStart		- message to show on successful start
	sNotifyMessageSuccEnd		- message to show on successful end
	sNotifyMessageFailStart		- message to show on failed start
	sNotifyMessageFailEnd		- message to show on ending failure
	sNotifyFileSucc			- file to attach on success notification
	sNotifyFileFail			- file to attach on failure notification
	sNotifySubjSucc			- email subject for successful notification
	sNotifySubjFail			- email subject for failure notification
	sNotifyRecipSucc0		- email recipients for successful jobs, suffix 0-255
	sNotifyRecipFail0		- email recipients for failed jobs, suffix 0-255
Post-Job Actions:
	iPostSuccessCode		- on success do this: 0=off 1=job 2=file
	iPostFailCode			- on success do this: 0=off 1=job 2=file
	sPostSuccessFile		- file or job name to execute on success
	sPostFailFile			- file or job name to execute on failure
	bPostRetry			- retry a failed job: 0=false 1=true
	iPostMaxRetries			- maximum number of retries
	iPostRetryDelay			- delay between retries: min or sec, see iPostDelayMinSec
	iPostDelayMinSec		- minute or second retry flag: 0=minutes 1=seconds
Job History keys:
	sLastStartDate			- Last successful start date for the job
	sLastStartTime			- Last successful start time for the job
	sLastEndDate			- Last end date for the job
	sLastEndTime			- Last end time for the job
	bLastStartStatus		- Last start status 1=successful 0=failed
General Options:
	bSecureJob			- job is secure from mod: 0=false 1=true
	bPauseOnFail			- pause job on failure: 0=false 1=true
	bHold				- initially place job in hold status: 0=false 1=true
	bDeleteJob			- delete job on successful completion: 0=false 1=tru
Program Execution Job form entries:
	sProgram		 	- program to execute
	sCommand Line			- command line parameters
	bDeleteJob		 	- Delete successful jobs. 0=false 1=true
	bEndScreenSaver			- Attempt to kill active screensaver. 0=false 1=true
	bChildProcess			- Attempt to terminate child processes. 0=false 1=true
Program Execution Success\Failure form entries:
	bErrLevSuccess			- use error level setting: 0=false 1=true
	bUseErrLevel			- error level to check for, ie: 1
	bUseFileExist			- use file existance checking: 0=false 1=true
	bFileExExist			- file must exist: 0=true 1=false
	bFileExSuccess			- success or failure flag: 0=success 1=failure
	sFileExFileName			- file to check for existance
	bSuccessAnd1			- "And" the errorlevel and subsequent tests 0=false 1=true
	bSuccessAnd2			- "And" the file existance and subsequent tests 0=false 1=true
	bUseIniKey			- Check INI key settings: 0=false 1=true
	bIniFileEqual			- is key equal: 0=false 1=true
	iErrLevEqual			- is error level equal: 0=equal 1=not equal
	iErrLevValue			- value of errorlevel to check
	sKeyName			- INI file key name
	sSectionName			- INI file section name
	sKeyValue			- check key value: 0=false 1=true
	sIniFileName			- INI file to check
Program Execution System Settings form entries:
	iWinType		 	- Type of window 0=Normal (default)
	iWinAppearance	 		- 0=normal 1=maximize 2=minimize 3=hidden
	iWinPriority	 		- 0=normal
	iWinApp				- 0=Create Process 1=Create Process (app) 2=Shell Execute
Program Execution Termination Settings form entries:
	iTerminationType 		- Termination type indicator code 0=off
	iTerminationDur			- Duration in minutes until termination
	iTerminationHour 		- Time HH for termination
	iTerminationMin			- Time MM for termination
	iTerminationSec			- Time SS for termination
	iTerminationLevel 		- Exit code to set on termination 0=default
Example Job Settings for a job to run the windows calculator
[SaveFileInfo]
sFileType=TechScheduler Job List Save File
sSaveDate=1998-03-04
sSaveTime=7:54:56 AM
[test calc]
sJobName=test calc
iJobType=0
sProgram=c:\windows\calc.exe
sCommand Line=
sLastModified=1998-03-04 7:54:41 AM
iFrequency=1
bExclDates=1
iRunLate=0
sFrequency Data=
sExcl0=1998/03/03
iCustomTimeType=2
iHour=7
iMin=43
iSec=0
iCustomTimeHourMin=0
sCustomTime0=08:02:00
bCustStartFlag=1
bCustEndFlag=1
iCustStartHr=5
iCustStartMin=30
iCustEndHr=23
iCustEndMin=15
iCheckPreStart=1
bCheckStartDir=1
bCheckDiskFree=1
iDiskFreeMb=10
sDiskFreeDrive=c
sStartDir=c:\windows
bCheckFileExist=1
sPreStartFile=c:\autoexec.bat
iPreFileFlag=0
bNotifyCode=1
iNotifyType=1
iNotifyStarts=1
iNotifyEnds=0
iNotifyStartf=1
iNotifyEndf=0
iNotifyFailInfo=0
sNotifyMessageSuccStart=test ok
sNotifyMessageSuccEnd=
sNotifyMessageFailStart=test fail
sNotifyMessageFailEnd=
sNotifyFileSucc=
sNotifyFileFail=
sNotifySubjSucc=Automatic Email Notification
sNotifySubjFail=Automatic Email Notification
sNotifyRecipSucc0=gates@microsoft.com
sNotifyRecipFail0=deansoft@compuserve.com 
iPostSuccessCode=2
iPostFailCode=0
sPostSuccessFile=c:\windows\calc.exe
bPostRetry=1
iPostMaxRetries=1
iPostRetryDelay=3
iPostDelayMinSec=0
sLastStartDate=1998-03-03
sLastStartTime=8:31:10 AM
sLastEndDate=1998-03-03
sLastEndTime=8:31:18 AM
bLastStartStatus=1
bHold=0
bSecureJob=0
bPauseOnFail=0
bDeleteJob=0
bEndScreenSaver=0
bChildProcess=0
bErrLevSuccess=0
bUseErrLevel=1
iErrLevEqual=0
iErrLevValue=0
bUseFileExist=1
sFileExFileName=autoexec.bat
bFileExExist=0
bFileExSuccess=0
bSuccessAnd1=1
bSuccessAnd2=1
bUseIniKey=0
sKeyName=
sSectionName=
sKeyValue=
sIniFileName=
bIniFileEqual=1
iWinType=0
iWinAppearance=0
iWinPriority=0
iWinApp=0
iTerminationType=1
iTerminationDur=3
iTerminationHour=0
iTerminationMin=0
iTerminationSec=0
iTerminationLevel=2

Dean Software Design:		Web site:	www.winutils.com
				email:		Winutils@aol.com
				Phone:		technical\marketing:		(425) 316-8645
						toll free order line:		(888) 252-5887
				Address:	P.O. Box 13032
						Mill Creek, WA 98082-1032
TechScheduler is copyright (c) 1997-1999 Dean Software Design
Windows, Windows 95 and Windows NT are copyright or registered trademarks of the Microsoft Corporation