Skip to content

Commit

Permalink
feat: typescript scheduled function
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahetter committed Nov 29, 2024
1 parent 25a76e7 commit 6ce141b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 11 additions & 0 deletions functions-templates/typescript/scheduled-function/{{name}}.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Config } from "@netlify/functions"

export default async (req: Request) => {
const { next_run } = await req.json()

console.log("Received event! Next invocation at:", next_run)
}

export const config: Config = {
schedule: "@hourly"
}
12 changes: 0 additions & 12 deletions functions-templates/typescript/scheduled-function/{{name}}.ts

This file was deleted.

0 comments on commit 6ce141b

Please sign in to comment.