Skip to content

Scheduled tasks configuration

Olivier Clavel edited this page Nov 26, 2019 · 4 revisions

The Nexus scheduled task configuration for the role is declared in the nexus_scheduled_tasks list variable.

General declaration example

This is what a general task declaration looks like. See below for common parameters desccriptions and example for each task types and schedule types.

nexus_scheduled_tasks:
  - name: Mandatory name of the scheduled task
    typeId: Mandatory internal nexus identifier for the type of task
    enabled: Optionnal task enable flag - defaults to true
    task_alert_email: Optional email for task fail alerts - defaults to empty
    taskProperties:
      # [ Hashmap - See doc by typeId ]
    booleanTaskProperties:
      # [ Hashmap - See doc by typeId ]
    schedule_type: Optionnal schecule type - defaults to cron
    # [ schedule specific parameters - See doc by schedule type]
  - # [ ... Next task ... ]

Common parameters description

The following parameters are common to all tasks

name:
  type: string
  description: Name of the scheduled task
  mandatory: true
typeId:
  type: string
  description: Identifier of the task type
  mandatory: true
enabled:
  type: boolean
  description: Is the task enabled ?
  default: true
  mandatory: false
task_alert_email:
  type: string
  description: Email to send faild task alerts
  default: ''
  mandatory: false
taskProperties:
  type: hashmap
  description: Hashmap of specific int/float/string task parameters
  default: {}
  mandatory: false  # Actually depends on the task type
booleanTaskProperties:
  type: hashmap
  description: Hashmap of specific boolean task parameters
  default: {}
  mandatory: false  # Actually depends on the task type
schedule_type:
  type: string
  description: Identifier of the schedule type
  default: cron
  mandatory: false  # Need to define a `cron` value if using this default

Task types and related settings.

Schedule types and related settings.

Clone this wiki locally