Skip to content

fix: handle null input in scheduled TypeScript cron runs - #18

Merged
BloggerBust merged 1 commit into
mainfrom
fix/4107-scheduled-cron-null-input
Jul 28, 2026
Merged

fix: handle null input in scheduled TypeScript cron runs#18
BloggerBust merged 1 commit into
mainfrom
fix/4107-scheduled-cron-null-input

Conversation

@BloggerBust

Copy link
Copy Markdown
Collaborator

Description

The v1 TypeScript SDK passes null through to the task when a cron run carries no input, so the released scheduled template failed on every cron firing. The task now falls back to an empty message when input is null.

The examples e2e only exercised the manual-run trigger, which always supplies input, so a cron firing was never tested. The TypeScript scheduled example now waits for a cron run and asserts it completed. Python and Go stop at manual-run validation because their SDKs fill a missing input with defaults.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Test changes (add, refactor, improve or change a test)

What's Changed

  • The scheduled TypeScript task returns an empty message instead of throwing when a cron firing delivers null input.
  • hack/e2e-examples.sh assert_cron_run waits for a cron run of the TypeScript scheduled example and fails the job if none completes.

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted

Testing

The full script ran locally against a fresh hatchet-lite stack. All six examples passed and the TypeScript cron wait completed. Before the fix, the same wait reproduced the TypeError on every firing.


🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.

  • Details: Claude Code (claude-fable-5) wrote the e2e cron assertions.

The v1 TypeScript SDK passes null through to the task when a cron run
carries no input, so the released scheduled template failed on every
cron firing. The task now falls back to an empty message when input is
null.

The examples e2e only exercised the manual-run trigger, which always
supplies input, so a cron firing was never tested. The TypeScript
scheduled example now waits for a cron run and asserts it completed.
Python and Go stop at manual-run validation because their SDKs fill a
missing input with defaults.
@BloggerBust
BloggerBust merged commit 000df2d into main Jul 28, 2026
3 checks passed
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