---
title: "Background Scripts"
description: "The \u0022Background Scripts\u0022 screen registers and changes background scripts."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-estate/subjects/advanced/background-scripts
original: https://documentation.invantive.eu/en/docs/invantive-estate/subjects/advanced/background-scripts
updated: 2026-10-31T00:00:00Z
license: https://documentation.invantive.eu/en/
---

The "Background Scripts" screen registers and changes background scripts.

Background scripts automate management processes and other time-consuming manual processes.

An example of a background script that automates an administrative process is `BUBS_EMPTY_INTERFACES`. This script removes the contents of the ERP interface tables.

A background script that needs parameters for processing has them in the "Script Parameters" part of the screen.

Registering background scripts is a typical activity for application developers. See the warning under Application Development.

The entry fields are:
- "Code": The unique code of the script.
- "Description": The description of the script.
- "Type of Program": The type of program. The types follow after this list.
- "Required Capacity Scheduler": The skills that a scheduler needs to process background jobs based on this script.
- "# Days to Keep": The minimum number of days after which the background jobs based on this script may be removed automatically.
- "# Versions to Keep": The minimum number of versions after which the background jobs based on this script may be removed automatically. The oldest versions are deleted first.
- "Runs Alone": When checked, at most one background job based on this script runs at a time.
- "Rerun on Success": When checked, a successfully completed background job based on this script starts again automatically.
- "Rerun on Warning": When checked, a background job based on this script that completed with a warning starts again automatically.
- "Rerun on Error": When checked, a background job based on this script that completed with an error starts again automatically.
- "Rerun Every (sec)": The time in seconds after which a new background job based on this script is requested automatically. This applies when "Rerun on Success", "Rerun on Warning" or "Rerun on Error" is checked.
- "MIME Type Output": The MIME type of the output of this script, for example `text/html`.
- "MIME-type Log File": The MIME type of the log output of this script, for example `text/html`.
- "Executable Program": The name of the executable program or, for Database PL/SQL, the code of the script to execute. Variables in the code are replaced by their values when the background script runs as a background process. The variables follow after this list.
- "Program is Expression": When checked, the program text is a SQL expression.

The field "Type of Program" has these values:
- Database PL/SQL: for executing database packages, ideally suited for database changes.
- Java Class: for executing a Java program, ideally suited for mathematically intensive or non-database processes.
- System Shell: for executing everything that cannot be executed as Database PL/SQL or Java class.

The following variables in the field "Executable Program" are replaced by their values:
- `:bjb_id`: ID of the background process.
- `:bjb_seq`: number of the background process.
- `:sdr_code`: code of the background scheduler.
- `:sdr_omschrijving`: description of the background scheduler.
- `:gbr_naam`: user who requested the background process.

The script parameters have these fields:
- "Code": The unique code of the script parameter.
- "Description": The description of the script parameter.
- "Sort Order": A numeric value that determines the order in which the script parameters appear in an entry form.
- "Required": Indicates whether a value for the script parameter is mandatory.

The other fields are:
- "Number of Executions": The total number of finished background jobs based on this script.
- "Total Execution Time (sec)": The total time in seconds that background jobs based on this script have run.
- "Minimum Execution Time (sec)": The shortest time in seconds that a background job based on this script has run.
- "Maximum Execution Time (sec)": The longest time in seconds that a background job based on this script has run.

Scripts of the category "System Shell" run with the applicable system shell. This is `command.com` for Windows 95, `cmd.exe` for other Windows versions and `/bin/ksh` for UNIX and Linux.