Skip to content

Add optional SCHEDULE clause to CREATE ROUTE - #45

Merged
asubbarao merged 3 commits into
mainfrom
luna/route-schedule
Oct 8, 2026
Merged

asubbarao merged 3 commits into
mainfrom
luna/route-schedule

Conversation

@asubbarao

Copy link
Copy Markdown
Owner

Adds an optional six-field, seconds-first SCHEDULE clause to CREATE ROUTE.
The schedule is stored on QuackapiRoute, exposed as nullable metadata from
quackapi_routes(), validated at create time, and replaced/removed with
CREATE OR REPLACE. Scheduled routes with final path parameters are rejected;
groups cannot own schedules, but grouped parameter-free routes can.

Documents and tests use the community cronjob extension with the in-process
quackapi_request TestClient. The exact bootstrap statement is documented in
README.md. Manual verification registered task_0 with query
SELECT * FROM quackapi_request('GET', '/cron-target') and schedule
*/1 * * * * *.

Validation:

  • Pinned DuckDB v1.5.6 release build: passed.

  • Focused route tests: 2,156 assertions passed.

  • Focused group tests: 26 assertions passed.

  • Full test/sql/quackapi*: 3,227 assertions across 37 test cases passed.

  • Skips: optional cronjob SQLLogic case (cronjob is not linked into the test
    runner) and the existing Postgres environment-gated case.

  • make format-ci-check and git diff --check: passed.

  • Codex Luna 5.6 high

Opened by Claude Fable 5.1 from a Codex Luna draft; README bootstrap example corrected to one cron() per route.

🤖 Generated with Claude Code

asubbarao-ifr and others added 3 commits October 8, 2026 02:23
A multi-row cron() over quackapi_routes() registers every job with the first row's schedule (cronjob on DuckDB 1.5.x), so the bootstrap example now generates one statement per route.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@asubbarao
asubbarao merged commit 6201b74 into main Oct 8, 2026
11 checks passed
@asubbarao
asubbarao deleted the luna/route-schedule branch October 8, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants