Tasks
Bu içerik henüz dilinizde mevcut değil.
Your app may need to execute tasks in the future on intervals or over a long time.
If you haven’t already, add the tasks
directory to your config
1export const tasks = "./dist/tasks"
The snippet below defines a task that runs every minute. Keep in mind that the file name is just a unique identifier and you can name it however you want.
1import { scheduledTask } from "@sern/handler";2
3export default scheduledTask({4 trigger: "* * * * *",5 execute: (context) => {6 console.log("cron cron")7 }8})
The trigger
is a cron tab pattern, you can edit and test one here.