Defining background tasks in the triggers table

Helix Core Server can use the triggers table to define background tasks that can be run with the p4 bgtask -t bgtask-name command or as a task at start up.

Example background task definition in the triggers table:

log_checker bgtask unset "p4 -p popeye:18100 logstat -s"

The defined log_checker bgtask can be:

  • invoked at the command-line by using p4 bgtask -t log_checker
    or
  • configured as a task that runs at server startup with p4 configure set "startup.1=bgtask -t log_checker"
Note

The -d option of p4 bgtask is not allowed when the background task is specified in a startup.N configurable.

The fields of a bgtask trigger definition:

Field Meaning

name

The name of the trigger, such as log_checker

type

bgtask

path

Use unset as the path value

command

The command or script the server runs in the background