Task Scheduling


In BBj 12.0 and higher, this scheduler causes a variety of tasks to execute automatically at a given time and with a given frequency. Access the scheduling feature using the BBj Enterprise Manager or the Admin API. Two components make up the scheduling feature: Task Groups and Tasks.

Scheduling Panel

The Scheduled Task Groups panel displays all currently configured task groups. Each group contains one or more scheduled tasks. The interface allows administrators to view each group’s name, schedule details, next and last run times, and current status. Using the buttons at the top-right of the panel, users can add new task groups, pause or delete existing ones, and refresh the display to show current status.

Access the Scheduling panel by expanding the BBjServices section in the Enterprise Manager navigation area and selecting "Scheduling" from the list.


Group Name Name of the scheduled Task Group
Schedule Shows the scheduled time, week/day/ and frequency pattern.
Next Run The next scheduled run time for the group. If disabled it will show disabled.
Last Run The last time the task group was executed.
Status Displays messages related to task execution or scheduling activity.

Task Groups

Task group settings UI elements and their functions:

Task Group NameThe name you give it to a task group.
Scheduled Run TimeLets you set when the task group should run on a schedule.
Initial Start TimeThe date and time when the task group should run for the first time.
End Time(check-box)If checked, lets you set a stop date/time when the task group should end.
Repeat TypeChooses how often the task repeats (e.g., daily, weekly, monthly).
Repeat EverySets the repeat interval (e.g., every 1 week, every 2 weeks, etc.).
Day Check-boxes Allows to choose which days of the week the task should run (e.g., Mon, Wed, Fri).
AutorunRuns the task group only when manually triggered, it does not follow a time based schedule.
Execute Click drop-down to choose what kind of task to run (e.g., BBj program).

Tasks

A Task is a single item to be managed and executed by a Task Group. There are several types of Tasks available to the scheduler: BBj Program, Execute System Call, Pause Replication Job, and Resume Replication Job.

Task Type - BBj Program

A BBj Program task runs a BBj program file on the server with options for config file, working directory, user credentials, runtime arguments, client properties, classpath, and execution flags like Quiet or Asynchronous. The task ends when the program finishes. Programs can CALL other routines or use SCALL, but GUI operations are not supported, as tasks run server-side without user interaction.

The Task Editor provides a way to configure the various program options and settings.


Task Type(s)

Type of task(s) to use: BBj Program, Execute System Call, Pause Replication Job, or Resume Replication Job.

Program File

Required, path to the BBj program file to execute.

Config File

Optional, config.bbx file used during execution.

Working Dir

Optional, alternate working directory to use for this program.

Run As User

Optional, alternate user to use for executing the program.

Run As PasswordOptional, password for the specified user, if needed.

Arguments

Optional, list of arguments to pass to the program.

Client Properties (PROP=value)Optional, define client properties in name=value format.

Quiet

Runs the BBj interpreter quietly.

AsynchronousIf checked, the program runs independently in the background.

Classpath

Specifies the session-specific classpath used during execution.

Run Now

Execute the task immediately for testing purposes.

Task Type - Execute System Call

Use this option to run an external script or executable on the server. Select Execute System Call from the task type dropdown, then specify the full path to the file you want to run. If the file is available in the system’s executable PATH, you can simply enter its name. The task completes when the script or executable finishes running either successfully or with an error.

Task Type - Pause/Resume A Replication Job

The pause task pauses the specified replication job to allow for a backup or similar script or program to perform some kind ofoperation on the affected files. A resume task resumes a paused replication job. Use the “Replication Job” drop down list to specify the replication job to pause or resume.