Skip to content

[Schedule Type] monthly

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

Description

Schedule a task to be run every specified day of the month starting at a specified date (defaults to now)

Related settings description

schedule_type: monthly
start_date_time:
  type: date
  format: "yyyy-MM-dd'T'HH:mm:ss"
monthly_days:
  type: list
  format: list in set [1..31, 999]  # 999 is last day of month

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 1st, 15th and last day of the month starting now
    typeId: script
    taskProperties:
      language: groovy
      source: "# Groovy script content"
    task_alert_email: alert@somewhere.info
    schedule_type: monthly
    monthly_days:
      - 1
      - 15
      - 999

  - name: Execute custom script every 3rd of the month starting at a later date
    typeId: script
    taskProperties:
      language: groovy
      source: "# Groovy script content"
    task_alert_email: alert@somewhere.info
    schedule_type: monthly
    start_date_time: "2050-12-31T00:00:00"
    monthly_days:
      - 3
Clone this wiki locally