Hello,
I have a a scheduled background function called test-background.ts. It is being deployed correctly to netlify. But never executing. I can’t tell why.
import { Config, Context } from "@netlify/functions";
export async function handler(req: any, context: Context) {
try {
console.log("Executing function with context: ", context);
return {
statusCode: 200,
body: "Pushed appfollow interactions successfully.",
};
} catch (err) {
return {
statusCode: 500,
};
}
}
export const config: Config = {
schedule: "*/5 * * * *",
};
In my netlify.toml I also try adding the function
[build]
command = "npm run build"
publish = ".next"
[functions."test-background"]
schedule = "*/5 * * * *"