Skip to content

[Schedule Type] weekly

Olivier Clavel edited this page Nov 25, 2019 · 1 revision

Description

Schedule a task to be run every specified weekday starting at a specified date (defaults to now)

Related settings description

schedule_type: weekly
start_date_time:
  type: date
  format: "yyyy-MM-dd'T'HH:mm:ss"
weekly_days:
  type: list
  format: list in set ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

Important note: Date must be enclosed in quotes in the configuration file

Example usage (for a simple script task type)

nexus_scheduled_tasks:
  - name: Execute custom script every Tuesday and Friday from now
    typeId: script
    taskProperties:
      language: groovy
      source: "# Groovy script content"
    task_alert_email: alert@somewhere.info
    schedule_type: weekly
    weekly_days:
      - TUE
      - FRI

  - name: Execute custom script every Wednesday and Saturday starting at later date
    typeId: script
    taskProperties:
      language: groovy
      source: "# Groovy script content"
    task_alert_email: alert@somewhere.info
    schedule_type: weekly
    start_date_time: "2050-12-31T00:00:00"
    weekly_days:
      - WED
      - SAT
Clone this wiki locally