Cron BackoffSchedule 502
When testing the sample code from the Deno Deploy docs in the Deno playgroud, I'm getting a 502 bad gateway error. To reproduce:
1. Copy code from https://docs.deno.com/deploy/kv/manual/cron#retrying-failed-runs
2. Paste code to https://dash.deno.com/tutorial/tutorial-cron
3. Save and Deploy
The logs say:
Also getting this issue on my project, but this is a simple way to reproduce. Couldn't find any mentioin of it on Github or in here. Shoud I open an issue, or am I doing something wrong?
3 Replies
It seems like you're encountering an issue with the
Deno.cron
functionality. The error message you're seeing indicates that Deno.cron
expects a single handler function, but it's possible that the way the code is being used might not be matching the expected signature.
According to the documentation, the Deno.cron
function should be used with three arguments:
1. A human-readable name for the cron task.
2. A cron schedule string or JavaScript object that defines a schedule on which the cron job will run.
3. A function to be executed on the given schedule.
Here's an example from the documentation:
Make sure that your code follows this structure. If you're still encountering the issue, it could be a bug or a limitation within the Deno playground environment. Since the Deno.cron
functionality is designed to be used within the context of Deno Deploy, it's possible that the playground may not fully support all features or may have different constraints.
If you've verified that your code matches the expected usage and you're still facing the issue, it might be worth reaching out on the official Deno Discord or opening an issue on the Deno GitHub repository for further assistance. The Deno community and maintainers can provide more context and help you troubleshoot the problem. 🦕🦕 Oops! Can you pinpoint where I went wrong to help me improve? 📈
The documented code is experiencing this issue
https://dash.deno.com/playground/clean-zebra-64