Skip to content

feat(cron): add script_only mode to bypass LLM entirely#17601

Open
Znarkus wants to merge 1 commit into
NousResearch:mainfrom
Znarkus:feature/cron-script-only-mode
Open

feat(cron): add script_only mode to bypass LLM entirely#17601
Znarkus wants to merge 1 commit into
NousResearch:mainfrom
Znarkus:feature/cron-script-only-mode

Conversation

@Znarkus
Copy link
Copy Markdown

@Znarkus Znarkus commented Apr 29, 2026

Summary

When a cron job has script_only=true and a script configured, the script stdout is delivered directly as the final message — no LLM is invoked at all.

This saves tokens and ensures 100% consistent formatting for jobs where the script already produces the final user-facing output. The [SILENT] marker still works to suppress delivery.

Changes

  • cron/scheduler.py — Early return in run_job() for script_only jobs: runs the script via _run_job_script() and returns output directly
  • cron/jobs.pyscript_only: bool parameter in create_job(), persisted in the job dict
  • tools/cronjob_tools.py — Schema property, handler wiring, create/update support, formatted output

Usage

# Create a script-only cron job (no LLM, no tokens)
cronjob(action='create', script='my_check.py', script_only=True, schedule='0 * * * *', name='Hourly check')

# Update existing job to script-only
cronjob(action='update', job_id='abc123', script_only=True)

25 lines added, 0 removed.

When a cron job has script_only=true and a script configured, the script
stdout is delivered directly as the message without invoking an LLM.

This saves tokens and ensures consistent formatting for jobs where the
script already produces the final user-facing output (e.g. email checks,
surf forecasts). [SILENT] marker still works to suppress delivery.

Changes:
- scheduler.py: early return in run_job() for script_only jobs
- jobs.py: script_only parameter in create_job()
- cronjob_tools.py: schema, handler, create/update support
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants