upstash / qstash-js

Message queue for serverless
https://docs.upstash.com/qstash
MIT License
133 stars 11 forks source link

fix: update schedules.ts to include destination and cron on create #50

Closed msywulak closed 9 months ago

msywulak commented 10 months ago

Description

Creating schedules using the new V2 endpoints doesn't use the destination or cron inputs and errors out with either:

Error creating schedule: QstashError: {"error":"invalid destination url: endpoint has invalid scheme, add http:// or https://"} or Error creating schedule: QstashError: {"error":"Invalid cron expression empty spec string"}

Changes

Fixes #49

Updates since initial PR

Note: This is my first PR so please don't hesitate to tell me I'm doing something wrong and happy to just wait for a general fix in the future.