Routines for rsch_ww.kb


R_AddEntry

File Name

rsch_ww.kb

Syntax

R_AddEntry IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine allows the user to enter a new schedule entry.

Dialog Forms Called

r_sched.dfc[edit_entry]


R_BatchScheduler

File Name

rsch_ww.kb

Syntax

R_BatchScheduler(VAL Args:LIST OF STRING) IS

Parameters

Args - Command line parm (Process Name)

Returns

WINDOW

Side Effects

None

Description

This routine executes the Scheduler from a command line.

Dialog Forms Called

r_sched.dfc[procprompt]


R_CalculateNextTime

File Name

rsch_ww.kb

Syntax

R_CalculateNextTime(VAL baseTime:TIME, VAL baseDate:DATE, REF currentModule:ModuleRecord) IS

Parameters

baseTime - Time the last entry was supposed to run

baseDate - Date the last entry was supposed to run

currentModule - Schedule entry record

Returns

Nothing

Side Effects

None

Description

This routine computes the next time and date that the given schedule entry should be run.

Dialog Forms Called

None


R_DeleteEntry

File Name

rsch_ww.kb

Syntax

R_DeleteEntry(VAL w: WINDOW) IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine removes the entry selected by the user after verifying through a message dialog.

Dialog Forms Called

None


R_DisableModule

File Name

rsch_ww.kb

Syntax

R_DisableModule(VAL modName:STRING, VAL procName:STRING) IS

Parameters

modName - Module Name

procName - Procedure Name

Returns

Nothing

Side Effects

None

Description

This routine makes entries inactive. This is done by the request of the scheduled program by sending a message back to the main Scheduler handle.

Dialog Forms Called

None


R_EditEntry

File Name

rsch_ww.kb

Syntax

R_EditEntry IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine allows the user to edit a selected schedule entry.

Dialog Forms Called

r_sched.dfc[edit_entry]


R_EditEntryEvent

File Name

rsch_ww.kb

Syntax

R_EditEntryEvent(REF currentRec:ModuleRecord) IS

Parameters

currentRec - Instance data for this dialog

Returns

Nothing

Side Effects

None

Description

This event handler is used during add/edit operations for entries in the SCHEDULE table.

Dialog Forms Called

r_sched.dfc[edit_entry]


R_EnableModule

File Name

rsch_ww.kb

Syntax

R_EnableModule(VAL modName:STRING, VAL procName:STRING) IS

Parameters

modName - Module Name

procName - Procedure Name

Returns

Nothing

Side Effects

None

Description

This routine enables schedule entries. This is done by the request of the scheduled program on behalf of a disabled program.

Dialog Forms Called

None


R_ExecuteModule

File Name

rsch_ww.kb

Syntax

R_ExecuteModule(REF currentModule:ModuleRecord) IS

Parameters

currentModule - Instance Data

Returns

Nothing

Side Effects

None

Description

This routine runs the program described by parameter currentModule.

Dialog Forms Called

None


R_Expired

File Name

rsch_ww.kb

Syntax

R_Expired(VAL currentModule:ModuleRecord):BOOLEAN IS

Parameters

currentModule - Current Module

Returns

Boolean

Side Effects

None

Description

This routine returns a boolean value indicating whether the interval has expired.

Dialog Forms Called

None


R_FillProcessIDCombo

File Name

rsch_ww.kb

Syntax

R_FillProcessIDCombo(VAL hdl:WINDOW) IS

Parameters

hdl - Window handler

Returns

Nothing

Side Effects

None

Description

This routine fetches all unique process names from the SCHEDULE table and inserts this list into the PROCESSID combo box of the given handle.

Dialog Forms Called

None


R_FixNames

File Name

rsch_ww.kb

Syntax

R_FixNames(REF modName:STRING, REF procName:STRING) IS

Parameters

modName - Module Name

procName - Procedure Name

Returns

Nothing

Side Effects

None

Description

This routine trims whitespace from the given modName and procName.

Dialog Forms Called

None


R_MakeFullName

File Name

rsch_ww.kb

Syntax

(REF temp:ModuleRecord) IS

Parameters

temp - Instance Data

Returns

Nothing

Side Effects

None

Description

This routine creates a concatenated name from the module name and the procedure name of the given entry. This full name is passed to CallFunction during execution of the entry

Dialog Forms Called

None


R_MakeProcPhrase

File Name

rsch_ww.kb

Syntax

R_MakeProcPhrase(VAL procName:STRING):STRING IS

Parameters

procName - Procedure Name

Returns

Nothing

Side Effects

None

Description

This routine creates the SQL clause for procedure name and handles all values, including "$UnKnown," for the procedure name.

Dialog Forms Called

None


R_Perform

File Name

rsch_ww.kb

Syntax

R_Perform(VAL temp:ModuleRecord) IS

Parameters

temp - Contains names of the processes to run

Returns

Nothing

Side Effects

None

Description

This routine executes the specified ASE function, OS/2 executable, or command.

Dialog Forms Called

None


R_ProcessExpirations

File Name

rsch_ww.kb

Syntax

R_ProcessExpirations IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine executes the scripts which are past due for their interval.

Dialog Forms Called

None


R_ProcessIDEntryEvent

File Name

rsch_ww.kb

Syntax

R_ProcessIDEntryEvent(REF sched:SchedulerRecord) IS

Parameters

sched - Instance data for this dialog

Returns

Nothing

Side Effects

None

Description

This is the event handler for process name dialog prompting.

Dialog Forms Called

None


R_ProcessStartupScripts

File Name

rsch_ww.kb

Syntax

R_ProcessStartupScripts IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine executes the scripts identified for immediate execution, then deletes them from the list of modules. Immediate execution is indicated by an interval of 0 days, 0 hours, 0 minutes, and 0 seconds.

Dialog Forms Called

None


R_ReadConfig

File Name

rsch_ww.kb

Syntax

R_ReadConfig IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine sets various configuration settings for the Scheduler.

Dialog Forms Called

None


R_ReadScheduleTable

File Name

rsch_ww.kb

Syntax

R_ReadScheduleTable IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine reads the SQL schedule table into a list.

Dialog Forms Called

None


R_RequestScheduler

File Name

rsch_ww.kb

Syntax

R_RequestScheduler IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine is a wrapper for the TCM Scheduler.

Dialog Forms Called

None


R_RunEvent

File Name

rsch_ww.kb

Syntax

R_RunEvent(REF currentModule:ModuleRecord) IS

Parameters

currentModule - Contains data for the current entry

Returns

Nothing

Side Effects

None

Description

This event handler is used to call the R_Perform function, which executes the current Module.

Dialog Forms Called

None


R_SchedulerEvent

File Name

rsch_ww.kb

Syntax

R_SchedulerEvent(REF scheduler:SchedulerRecord) IS

Parameters

scheduler - Instance data

Returns

Nothing

Side Effects

None

Description

This routine does event processing for the scheduler.

Dialog Forms Called

None


R_StartScheduler

File Name

rsch_ww.kb

Syntax

R_StartScheduler(VAL processID:STRING):WINDOW IS

Parameters

processID - Process ID

Returns

WINDOW

Side Effects

None

Description

This function provides service of starting Scheduler to other SA-Script programs.

Dialog Forms Called

r_sched.dfc[scheduler_main]


R_StartupScript

File Name

rsch_ww.kb

Syntax

R_StartupScript(VAL currentModule:ModuleRecord):BOOLEAN IS

Parameters

currentModule - Current Module

Returns

Boolean

Side Effects

None

Description

This routine determines if the given module is supposed to be run at startup time.

Dialog Forms Called

None


R_TimeKeeper

File Name

rsch_ww.kb

Syntax

R_TimeKeeper(REF scheduler:SchedulerRecord) IS

Parameters

Scheduler - Schedule instance data

Returns

Nothing

Side Effects

None

Description

This is the event routine for the invisible window used for setting and receiving timers. The "R_SchedulerEvent" can not do it because it is a dialog, not a window.

Dialog Forms Called

None


R_UpdateTimes

File Name

rsch_ww.kb

Syntax

R_UpdateTimes(REF currentModule:ModuleRecord) IS

Parameters

currentModule - Instance Data

Returns

Nothing

Side Effects

None

Description

This routine updates the SQL schedule table with the last run time and date of the current entry, then calculates the next run time for the entry.

Dialog Forms Called

None


R_UserExecute

File Name

rsch_ww.kb

Syntax

R_UserExecute IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine executes a module which the user has selected to run.

Dialog Forms Called

None