File Name
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]
File Name
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]
File Name
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
File Name
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
File Name
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
File Name
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]
File Name
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]
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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
File Name
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]
File Name
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
File Name
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
File Name
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
File Name
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