Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  • Purpose

  • Process configuration

  • Job logic

...

Name

Description

Format

Default value

DECLARATION_AUTOTERMINATION_SCHEDULE

How often to perform this task

Cron Format

“0 0-4 * * * *”

Job logic

  1. Fetch records from OPS.declarations, where:

    1. is_active = TRUE

    2. status not in [closed, terminated, rejected]

    3. end_date < current_date()

  2. Update all records to:

    1. status = ‘closed’

    2. updated_at = now()

    3. updated_by = SYSTEM_USER