Skip to content
Astera Technology

Choose a policy for overlapping scheduled runs

Execute queue, skip and overlap policies on the same supplied trigger trace.

Download complete case notes and answer keys ↓

Set the decision and its input

Triggers occur at minutes0 and10; each run takes12. The supplied queue policy starts the second at12 and finishes24. An overlap implementation starts it10 and finishes22. Under skip, only the first run executes and10 is explicitly skipped.

Filled local test worksheet
CaseInput JSON
Base test{"policy":"queue","triggers":[0,10],"duration":12}
Download editable CSV ↓

Run the supplied comparison

The deterministic local scheduler constructs each run’s scheduled, start and finish times. It specifies expected execution behaviour, not a real platform’s scheduling feature or a production benchmark.

Faulty and required outputs
PathOutput JSON
Faulty path{"runs":[{"scheduled":0,"start":0,"finish":12},{"scheduled":10,"start":10,"finish":22}],"skipped":[]}
Required path{"runs":[{"scheduled":0,"start":0,"finish":12},{"scheduled":10,"start":12,"finish":24}],"skipped":[]}
Download editable CSV ↓
Complete local Node24.14.1 programme
import assert from 'node:assert/strict';

const run=function run(i,corrected=true){
    if(!['queue','skip','overlap'].includes(i.policy))return {held:true};
    const runs=[],skipped=[];let busyUntil=-Infinity;
    for(const scheduled of i.triggers){const policy=corrected?i.policy:'overlap';if(policy==='skip'&&scheduled<busyUntil){skipped.push(scheduled);continue;}
      const start=policy==='queue'?Math.max(scheduled,busyUntil):scheduled;const finish=start+i.duration;runs.push({scheduled,start,finish});busyUntil=Math.max(busyUntil,finish);}
    return {runs,skipped};
  };
const cases=[{"input":{"policy":"queue","triggers":[0,10],"duration":12},"corrected":false,"expected":{"runs":[{"scheduled":0,"start":0,"finish":12},{"scheduled":10,"start":10,"finish":22}],"skipped":[]}},{"input":{"policy":"queue","triggers":[0,10],"duration":12},"corrected":true,"expected":{"runs":[{"scheduled":0,"start":0,"finish":12},{"scheduled":10,"start":12,"finish":24}],"skipped":[]}},{"input":{"policy":"skip","triggers":[0,10],"duration":12},"corrected":true,"expected":{"runs":[{"scheduled":0,"start":0,"finish":12}],"skipped":[10]}},{"input":{"policy":"queue","triggers":[0,10],"duration":10},"corrected":true,"expected":{"runs":[{"scheduled":0,"start":0,"finish":10},{"scheduled":10,"start":10,"finish":20}],"skipped":[]}},{"input":{"policy":null,"triggers":[0,10],"duration":12},"corrected":true,"expected":{"held":true}}];
for(const test of cases){const actual=await run(test.input,test.corrected);assert.deepEqual(actual,test.expected);console.log(actual);}
Download runnable example ↓

Choose from the boundary evidence

At exactly10 minutes duration, the next run can start10 without overlap. Missing policy is held before counting expected outputs.

  1. Read the overlap disposition
  2. Execute the trigger trace
  3. Inspect runs and skipped triggers

Do not infer queueing from the word scheduled.

Editable boundary inputs and outputs
ConditionInput JSONExpected output JSON
skip while occupied{"policy":"skip","triggers":[0,10],"duration":12}{"runs":[{"scheduled":0,"start":0,"finish":12}],"skipped":[10]}
exact finish permits next run{"policy":"queue","triggers":[0,10],"duration":10}{"runs":[{"scheduled":0,"start":0,"finish":10},{"scheduled":10,"start":10,"finish":20}],"skipped":[]}
policy absent{"policy":null,"triggers":[0,10],"duration":12}{"held":true}
Download editable CSV ↓

What is the queued second run’s base interval?

Show the worked answer

12..24, for the trigger scheduled at10. A10..22 interval would implement overlap instead.

Related resources