---
id: CAP-ACC-BKS-018
title: 'Preview, run and review scheduled Accounting work'
feature: FEAT-ACC-BKS-06
product_area: accounting
module: books
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes: []
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources: []
purpose: >-
  Staff preview recurring timing and inspect the outcomes of scheduled work they
  can read.
outcomes:
  - Due work has one claimed occurrence with local-time interpretation.
  - Preview explains timing before schedule changes are saved.
  - Run history follows access to the owning subject.
concepts:
  - CON-ACC-BKS-006
actors:
  - ACT-ACC-001
  - ACT-ACC-002
  - ACT-ACC-005
surfaces:
  - console
  - api
  - job
preconditions: []
postconditions: []
permissions:
  - key: accounting.application.access
    where_checked: api
    scope: tenant
  - key: accounting.recurring-batches.read
    where_checked: service
    scope: tenant
  - key: accounting.batches.read
    where_checked: service
    scope: tenant
  - key: accounting.reconciliation-batches.read
    where_checked: service
    scope: tenant
  - key: accounting.reconciliation-exceptions.read
    where_checked: service
    scope: tenant
  - key: accounting.recurring-billing-runs.read
    where_checked: service
    scope: tenant
rules:
  - id: BR-CAP-ACC-BKS-018-01
    proved_by: [ATS-ACC-BKS-018-01, TST-ACC-BKS-177]
    statement: >-
      Preview returns a schedule description, problems, warnings and five future
      instants with local times, saves nothing and requires application access.
    kind: calculation
    enforced_at:
      - api
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js#answers
      the next five runs, skipping the weekend, each as the instant and the
      local time
    origin: none
  - id: BR-CAP-ACC-BKS-018-02
    proved_by: [ATS-ACC-BKS-018-02, TST-ACC-BKS-177]
    statement: A schedule without a specified time zone uses the workspace’s zone.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js#reads
      it in the tenant’s zone from platform.tenants
    origin: none
  - id: BR-CAP-ACC-BKS-018-03
    proved_by: [ATS-ACC-BKS-018-03, TST-ACC-BKS-177]
    statement: >-
      Preview reports an interval shorter than the supplied minimum as a problem
      and returns no description or occurrences for an impossible weekly
      schedule with no weekdays.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js#answers
      the same hourly schedule as a problem when asked about a minimum interval
      of a day
    origin: none
  - id: BR-CAP-ACC-BKS-018-04
    proved_by: [ATS-ACC-BKS-018-04, TST-ACC-BKS-177]
    statement: >-
      Run-history access requires the scheduled subject’s read permission in
      addition to application access.
    kind: permission
    enforced_at:
      - api
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js#answers
      403 to a caller who may open Accounting but not read the recurring batch
      the schedule belongs to
    origin: none
  - id: BR-CAP-ACC-BKS-018-05
    proved_by: [ATS-ACC-BKS-018-05, ATS-ACC-BKS-018-10, TST-ACC-BKS-187]
    statement: >-
      A due occurrence is claimed only once during racing dispatches, and
      disabled schedules are not claimed.
    kind: invariant
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/scheduling/schedules-end-to-end.integration.spec.js#is
      claimed exactly once
    origin: none
  - id: BR-CAP-ACC-BKS-018-06
    proved_by: [ATS-ACC-BKS-018-05, ATS-ACC-BKS-018-09, TST-ACC-BKS-187]
    statement: >-
      The tested spring transition moves a 2:30 AM occurrence to 3:30 AM and
      dates the work using the occurrence’s local day.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/scheduling/schedules-end-to-end.integration.spec.js#runs
      once, at 03:30 local (07:30 UTC), the first instant after the gap
    origin: none
  - id: BR-CAP-ACC-BKS-018-07
    proved_by: [ATS-ACC-BKS-010-05, ATS-ACC-BKS-018-05, TST-ACC-BKS-187]
    statement: Five consecutive failures pause the schedule.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/scheduling/schedules-end-to-end.integration.spec.js#pauses
      the schedule after the fifth failure in a row
    origin: none
  - id: BR-CAP-ACC-BKS-018-08
    proved_by: [ATS-ACC-BKS-018-08]
    statement: Run-history pages sort newest first and contain at most 200 runs.
    kind: policy
    enforced_at:
      - api
    must_prove: false
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js#answers
      the newest runs first, as many as the limit, every property of each
    origin: none
  - id: BR-CAP-ACC-BKS-018-09
    proved_by: []
    statement: >-
      Accounting schedules recurring-batch rolls, automatic batch close,
      reconciliation overdue and drift sweeps and idempotency purge, and
      recurring-billing-run preparation.
    kind: policy
    enforced_at:
      - service
    must_prove: false
    provenance: observed
    source: >-
      services-accounting:modules/maintenance/services/scheduled-work/accounting-scheduled-work.ts:ACCOUNTING_SCHEDULED_WORK
    origin: none
  - id: BR-CAP-ACC-BKS-018-10
    proved_by: [ATS-ACC-BKS-018-06, ATS-ACC-BKS-018-07]
    statement: >-
      Saving an owned schedule validates its definition and minimum interval and
      recalculates the next occurrence, while schedule deletion cascades to its
      run history.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: observed
    source: 'services-accounting:modules/maintenance/services/persistence/schedules.ts'
    origin: none
scenarios:
  - id: SC-CAP-ACC-BKS-018-01
    given: A recurring batch runs at nine on New York weekdays.
    when: The controller asks to preview its timing.
    then: >-
      The preview describes the recurrence and presents five upcoming weekday
      occurrences in local time.
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js#answers
      each run at 9 AM on New York’s clock, in its offset that day
edge_cases: []
constraints: []
depends_on: []
related:
  - CAP-ACC-BKS-010
journeys: []
open_questions: []
evidence:
  - 'Verified source file: services-accounting:aws/accounting.service.ts'
  - >-
    Verified source file:
    services-accounting:modules/maintenance/db/schedules.table.ts
  - >-
    Verified source file:
    services-accounting:modules/maintenance/services/persistence/schedules.ts
  - >-
    Verified source file:
    services-accounting:modules/maintenance/services/scheduled-work/accounting-scheduled-work.ts
  - >-
    Verified source file:
    services-accounting:modules/maintenance/tests/e2e/schedules.e2e.spec.js
  - >-
    Verified source file:
    services-accounting:modules/maintenance/tests/integration/services/scheduling/schedules-end-to-end.integration.spec.js
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-DAT-004, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-AVL-001, TC-AVL-004, TC-MON-001, TC-MON-002, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-004, TC-PI-005]
exercised_by: [FAS-ACC-BKS-03-02, FAS-ACC-BKS-06-04, FAS-ACC-BKS-06-05]
suites: [TST-ACC-BKS-177, TST-ACC-BKS-187]
---

# Preview, run and review scheduled Accounting work

## Purpose

Staff preview recurring timing and inspect the outcomes of scheduled work they can read.

## How It Works

Staff preview a schedule while editing the record that owns recurring work. The preview helps them check local timing before saving. The dispatcher identifies due occurrences and gives them to workers. Run history records what happened to each occurrence. Staff need permission to read the scheduled subject before they can inspect that history. Repeated failures pause the schedule for attention. Owners update or remove schedules as part of their own record workflows.

## Relationships

Batch, reconciliation and Billing records own the subjects; this capability supplies shared scheduling.
