denoland / denoland/deploy_feedback
[Bug]: logs showing the deployment still in preview after promote to production. Crons not showed in production, maybe for the same reason
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
I have promoted my deployment to production and I see a message in the logs as the deployment still in preview.
I do not see the crons I have in my code and I think is related with this issue.

### Steps to reproduce
1. create a simple deno project with a cron inside
2. deploy to deno deploy with `deployctl deploy`
### Expected behavior
When a deployment is promoted to production their crons should appear in its corresponding tab and the logs should't show the message
> Crons are not supported for preview deployments. Cron jobs will not be executed in this context.
### Environment
_No response_
### Possible solution
_No response_
### Additional context
```typescript
// NOTE: Crons should be defined at top level module scope
Deno.cron("sample cron", "* * * * *", () => {
console.log(`Hello at ${new Date(Date.now()).toString()}`);
});
import * as supabase_js from "jsr:@supabase/supabase-js";
const BOOK_ROUTE = new URLPattern({ pathname: "/books/:id" });
import { createClient } from "jsr:@supabase/supabase-js@2";
function handler(req: Request): Response {
Deno.cron("sample cron", "*/10 * * * *", () => {
console.log("cron job executed every 10 minutes");
});
const match = BOOK_ROUTE.exec(req.url);
if (match) {
const id = match.pathname.groups.id;
return new Response(`Book ${id}`);
}
return new Response("Not found (try /books/1)", {
status: 404,
});
}
Deno.serve(handler);
console.log("HOLA fuera del CRON");
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.