Open
Description
Version: Deno 2 Latest
It seems you can not use an async () => expression with Deno.cron() in Deno Deploy. At least for me it seems not working. Or do i miss something here? Documentation says not much about it.
When i use it, as in an example from Deno, something strange happens:
The then()
block (or the part after an "await" - when using a/a) is being called fine. But the asynchronous method itself somehow not correctly executes.
You can find my rather small project here: https://github.com/mbodm/wowcam-deno
- It has a server (in server.ts) which serves an API (by using
Deno.serve()
) - The endpoint "scrapes/update" calls the
update()
function in logic.ts - In main.ts you see the
Deno.cron()
job - The CRON job also calls the
update()
function in logic.ts
If i call above endpoint from the browser, the update()
function is running fine. When called by the Deno.cron()
handler, nothing happens.
I don`t get it... :(
PS: Also a fetch()
call not works inside the Deno CRON handler.
Metadata
Metadata
Assignees
Labels
No labels