background Command

The background command starts a phantom job with rerun and delay facilities. If the command 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 command is typed alone at TCL, then the user is prompted for questions pertaining to the job. If the first parameter after the command 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. For example, a job can be configured to run once per minute, every Thursday at 10:00 PM, or Monday through Friday between the hours of 8:00 AM and 5:00 PM.

All output from background jobs is captured in a D3 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 restart them, use the :background-start command.

Syntax

background {? or tcl.command { | tcl.command or data { |...}}}

 

WARNING

The background command will not restart any job that has logged itself off, which is the case with the file-save command. Use the f option of the file-save command to prevent the process from logging itself off.

Example 1

background sselect md | sl stuff

11:30:16 07 Mar 2003 from user kim line 130

kim*9*9928*41415 completed.

Example 2

background ?

Seq

Background

Command

User

Prt

Act Date

Time

Status

> 1

1PERMIN

POKE 11 TIME

kim

9

03/07/03

11:00

Enabled

2

WHERE

WHERE

kim

9

03/07/03

12:18

Disabled

 

Select a background and press Enter.

Press CTRL+N to select sequence 2.

Background job where was created at 10:17 on 03-07-03.

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-03.

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-03

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 exclude 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) ?

Should the rescheduling of this job be dependent on the successful execution of the previous iteration  (Y/N)y

Background job WHERE was created at 10:17 on 03-07-03.

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-03.

Okay to start this background job (Y/N) ?y

Example 3

background

Enter background job's item-ID ?kimmail

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 command.

For example, if you wanted to make a copy of the time command 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="kim"`` 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 exclude 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) ?

Should the rescheduling of this job be dependent on the successful execution of the previous iteration  (Y/N)y

Background job kimmail was created at 12:16 on 03-07-03.

it will execute the following commands:

msg !10 You have @`field 2 @`select mail with usr="kim"`` 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

See Also

:background-start Command

:background-stop Command

@ Shell Variable

z Command