tcl.background Verb: Access/SQL

tcl.background

Command tcl.background Verb: Access/SQL
Applicable release versions: AP 6.2
Category SQL (13)
Description starts a "phantom" job with rerun and delay facilities.

If the verb is executed with a TCL command attached, it behaves just like the 'zs' command, except the output is captured in the backgrounds.output file. If the verb is typed alone at tcl, then the user is asked a number of questions pertaining to the job. If the first parameter after the verb is a question mark, a list of already-created background jobs is presented for the user to modify.

Background jobs differ from regular phantom jobs in their ability to be scheduled for a later time and date, and their ability to rerun based on certain rules. A job can be configured to run once per minute, every thursday at 10:pm, or monday through friday between the hours of 8:00am and 5:00pm (for example).

All output from background jobs is captured in a pick file called backgrounds.output. Information on the status of a job after each run is captured in a file called backgrounds.report. To stop background processing (but not phantom processing) at any time, use the :BACKGROUND-STOP command. To re-start them, use the :BACKGROUND-START command.
Syntax background {TCL command { | TCL command or data { | ... }}}
background {?}
background
Options
Example
<example 1>
:background sselect md | sl stuff<cr>
:
11:30:16 07 Mar 1995  from user jl line 130
jl*9*9928*41415 completed.

<example 2>
:background ?<cr>
<screen clears>
Seq Background           Command         User    Prt Act date Time  
> 1 1PERMIN              POKE 11 TIME    jl      9   03/07/95 11:00          
   
  2 WHERE                WHERE           jl      9   03/07/95 12:18             

Select and press <RETURN>
<press ctrl-n to select sequence 2>
Background job WHERE was created at 10:17 on 03-07-95.
it will execute the following commands:
   WHERE<
It is automatically re-executed every 60 minutes.
It has already been executed 2 times.
It will run at 12:18 on 03-07-95.

Is this the background job you want to change (Y/N) ?y

Do you want to disable this job: (Y/N) ?n

Default is message will not be sent to this port upon completion
Return a message to this line when done (Y/N) ?

Commands already entered are: 
     WHERE<
Do you want to re-enter (Y/N) ?

Next activation is on 03-07-95
Enter beginning date ?

Next activation time is 12:18
Enter starting time ?

Job will re-activate every 0 days
Rerun job after how many days  ?

background job will re-execute every 60 minutes
Rerun after how many hours, minutes (HH:MM) ?

If you wish to exlcude days from activation, enter codes for the days as
SUN,MON,TUE,WED,THU,FRI,SAT separated with commas (,) e.g. 'SAT,SUN'.
Excluding days ?

Exclude hours (hh:mm-hh:mm) ?


Background job WHERE was created at 10:17 on 03-07-95.
it will execute the following commands:
   WHERE<
It is automatically re-executed every 60 minutes.
It has already been executed 2 times.
It will run at 12:18 on 03-07-95.
Okay to start this background job (Y/N) ?y

<exampe 3>
:background

Enter background job's item-id ?jlmail
Creating new background job

Default is message will not be sent to this port upon completion
Return a message to this line when done (Y/N) ?n

Enter commands.  Use the "|" key to split data from the verb.
For example, if you wanted to make a copy of the "time" verb in
the md giving it the new name of "time.backup", the command would
be: copy md time (o|time.backup
Enter command?msg !10 You have @`field 2 @`select mail with 
usr="jl"`` msgs 
Enter command?
execute immediately (y/n) ?y
Is this background job to recur (Y/N) ?y

Job will re-activate every 0 days
Rerun job after how many days  ?
Rerun after how many hours, minutes (HH:MM) ?5:00

If you wish to exlcude days from activation, enter codes for the days as
SUN,MON,TUE,WED,THU,FRI,SAT separated with commas (,) e.g. 'SAT,SUN'.
Excluding days ?sat,sun

Exclude hours (hh:mm-hh:mm) ?


Background job jlmail was created at 12:16 on 03-07-95.
it will execute the following commands:
   msg !10 You have @`field 2 @`select mail with usr="jl"`` msgs <
It is automatically re-executed every 300 minutes.
It will not activate on SUN SAT .
It will run as soon as possible.
Okay to start this background job (Y/N) ?y
:
Purpose
Related tcl.:background-start
tcl.:background-stop
tcl.@
tcl.z