Skip to content
[bmdpat]
All writing
5 min read

I Replaced Five Scheduled Tasks with Codex Cron

On 2026-10-17, I killed five Windows scheduled tasks and moved nightly queues to seven Codex cron jobs. The security audit stayed red across five repos.

ShareLinkedIn

I retired five Windows scheduled tasks on 2026-10-17. The host ran them until 14:40. Then I handed the nightly queues to seven Codex cron jobs on gpt-6.1-sol. The security verdict stayed RED across five repos.

Key decisions from I Replaced Five Scheduled Tasks with Codex CronOpen full-size image (opens in new tab)

What broke across the repos before anything shipped?

Disk space ran out and security scans flagged 74 issues across five repositories on 2026-10-17. Two reflection engines failed, the knowledge reindexer crashed with exit code 134, and backup jobs halted. Nothing moved forward until I recorded the damage and opened tracking issues.

The disk hit 0 bytes at 22:39 on 2026-10-16. That broke the backup mirror run. The pat-reflection script died on two model engines. Then kg-reindex exited with code 134. SecurityAnalyst reported 8 P0, 28 P1, and 38 P2 issues across five repos. I opened issue #2029 on bmdpat for Pillow 9.5.0. I filed issue #878 on agent47 for proxy-addr. Then I logged issue #281 on dashboard for Next 16.3.0. Both P0 alerts on autotrader were fixtures.

Why did the overnight sweeps stall?

Overnight sweeps stalled because git branch tracking fell behind while provenance baselines failed to match on 2026-10-17. Zero pull requests merged from either batch script. Without verified step receipts, background workers skip work silently while repo queues pile up without human notice.

Between 02:49 and 02:56 on 2026-10-17, the sweep script merged 0 items, held 1, and escalated 0. Nine bmdpat tasks skipped because of a provenance-baseline mismatch. The GitHub sweep merged 0 items and held 16, while PR #2023 stayed BEHIND on main. You cannot fix what you cannot verify, which is why I run BMD, see what your agents actually did on these loops. On PyPI, package downloads dropped to 7 against a week average of 18, down 40.9%. The Loops tracker counted 171 human sessions, 2 clicks, and 0 install intents.

How did five scheduled tasks turn into seven Codex cron jobs?

I retired five legacy Windows tasks by 14:40 on 2026-10-17 and replaced them with seven Codex cron jobs. The new jobs run on gpt-6.1-sol at xhigh effort between 01:00 and 04:00 CT. Every task must output pull requests only, with zero auto-merge permissions.

The retired tasks were BrainWorker, QueueSweep, QueueSweepRetry, GrokDispatch, and BmdpatGithubSweep. Migration commit 278f91f892 and verification receipt 1f60e74647 confirmed 159 tests passed. Another 56 field checks cleared, and 97 task definitions matched the old Windows definitions byte for byte. No BrainWorker report fired at 21:00 on 2026-10-17 because I killed that schedule seven hours earlier. For controlling token usage on long agent runs, see my notes on AI agent cost control.

Task NameRetired ScheduleCodex Cron ReplacementBranch Policy
BrainWorker21:00 Windows Task01:00 to 04:00 CT cronPR-only, no auto-merge
QueueSweepNightly Windows Task01:00 to 04:00 CT cronPR-only, no auto-merge
QueueSweepRetryNightly Windows Task01:00 to 04:00 CT cronPR-only, no auto-merge
GrokDispatchNightly Windows Task01:00 to 04:00 CT cronPR-only, no auto-merge
BmdpatGithubSweepNightly Windows Task01:00 to 04:00 CT cronPR-only, no auto-merge

Other work shipped on 2026-10-17 after the queue cutover. In bmd-desktop PR #626 at commit d96e4b69, BMD-179 updater packed its modules. I signed release 3.47.2450 in a clean sandbox and published to bmd-releases. Commit ab352a9771 placed Reports/Vault-Map/board.json on main. Autotrader PR #137 shipped commit bc5841aed8 with quiet health polls. The blog reached HTTP 200 after Gemini 3.8 Flash drafted Twelve Characters Put My Government Page Live with 1 repair. A local Three.js build of Bastion and Bone passed 950 rules tests and 72 arena checks. If you benchmark local engine setups on desktop hardware, read my 5090 local inference guide.

Two systems said no on 2026-10-17 and both were right. Grok rescored the retailer EDI card at 9 of 10 and rejected it because existing tools left no gap. The CI guard stopped a script from freezing the 2026-10-16 VM image again. Between 02:21 and 12:14 on 2026-10-17, I logged the bmd-desktop refocus four times on a change already half shipped. File 90-day cannon.md still reads horizon 2026-10-15 and last_updated 2026-10-12. The verdict stays red.

What should you do with this?

You should strip write authority from unmonitored scripts and force your background fleet into audited pull requests. Background jobs fail silently when storage exhausts or environments drift. Putting every run behind gated branches, explicit receipt hashes, and pre-flight health checks keeps unattended machines from breaking your main branch.

  1. Convert raw worker tasks into PR-only branches. Configure your runner to push a branch and stop instead of merging directly to main.
  2. Add disk and memory gates before scheduled sweeps. Halt the job if free disk space drops below 5 GB or if local processes exit non-zero.
  3. Check git diff receipts after every run. Verify byte identity against known definitions before retiring any legacy scheduling task.

Accompanying prompt

What the prompt does: Audits a nightly scheduled script to generate pull requests without auto-merge authority.

Copy/paste this prompt:

Copy-ready prompt

Paste the exact block into your coding agent.

No article chrome, no footnotes, no formatting drift.

Role: Automation Security Auditor Context: You are migrating legacy scheduled background tasks into gated cron jobs that interact with git repositories. You ensure no job merges automatically and that all outputs produce verifiable receipts. Inputs: - Host OS: __ - Legacy task name: __ - Execution window: __ - Model name: __ - Reasoning effort: __ - Target repository: __ - Free disk threshold: __ GB Task: 1. Review the execution configuration for the legacy task named in the inputs. 2. Generate a cron specification that runs only within the specified execution window using the designated model and reasoning effort. 3. Add a pre-flight disk check that halts execution if free space is below the specified threshold. 4. Restrict all git write actions to branch creation and pull request submission, explicitly disabling auto-merge. 5. Create a verification receipt step that logs commit hashes and exit codes for every stage. Output: - Gated cron configuration block - Pre-flight disk space validation check - Pull request submission rule definition Constraints: - No auto-merge commands allowed - Do not assume root or administrator privileges - All failures must log non-zero exit codes
31 lines1199 chars
Ready

This prompt and every other one we publish live in the free prompt library.

Copy the block above.

Weekly measured local runs: https://bmdpat.com/5090-reports

Get the Local AI Field Kit

Four copy-ready tools now, then one evidence-backed Local AI Lab Note on Friday when there is something worth sharing.

Try the free agent run check first

Get the requested artifact now, then at most one evidence-backed Local AI Lab Note on Friday when there is something worth sharing. One-click unsubscribe. No sponsored placements. Privacy.

Written by

Patrick Hughes

I build BMD and publish measured AI runs, failure reports, and reusable checks. Nashville, Tennessee.

More writing