Routines & scheduling

A routine is a described job Harness can repeat. This is how to write one, test it, and let it run on time without giving up the approval gate.

Overview

What this covers

One-off tasks and saved routines, how to describe a job so it survives repetition, testing before you schedule it, and how a scheduled run behaves when nobody is watching.

How it works

How it works

A routine is made of five things:

  • A description in plain language — the goal and the shape of the finished result.
  • Permitted sources — the exact folders, mailboxes or systems it may read.
  • Capabilities — what it may do with them, granted one at a time.
  • An approval policy — which actions must stop for a person.
  • An output destination — where the result is saved or sent.

Before each run, Harness restates the scope it understood. On a scheduled run that restatement is written to the audit trail instead of waiting for you, so you can check afterwards what it believed it was doing.

Step by step

Step by step

  1. Describe the routine as if briefing a new colleague.
  2. Run it once by hand and read the restated scope.
  3. Check the output and the audit trail against what you expected.
  4. Adjust the description where it guessed wrong — not the result.
  5. Repeat until two runs in a row need no correction.
  6. Save it as a routine and set the schedule.
  7. Watch the first scheduled run, then check the queue and trail.

Common problems

Common problems

  • The routine drifts. A source changed shape — a renamed column, a moved folder. Update the description and the permitted source, then re-test.
  • A scheduled run did not happen. The PC was asleep or off. Harness does the work on that machine, so it needs to be awake at the scheduled time.
  • The output was overwritten. Two runs wrote to the same destination. Give the output a dated name or a separate folder.
  • It waits every time. The approval policy is catching an action you consider routine. Narrow the policy deliberately — do not widen capabilities to avoid the gate.

Related

Keep the blast radius small

A routine is only as safe as the capabilities you granted it.