{"id":"15c4ef02-46ee-4966-a393-56130bd0c506","task":"Create a scheduled (cron) Netlify Function","domain":"docs.netlify.com","steps":["Write a function in netlify/functions/, e.g. my-job.mts: export default async (req) => { const { next_run } = await req.json(); console.log('next run', next_run); }.","Declare the schedule in code (TypeScript/JavaScript only): export const config = { schedule: \"@hourly\" } — accepts @yearly/@monthly/@weekly/@daily/@hourly or full cron syntax like \"0 0 * * *\" (UTC).","Alternatively declare it in netlify.toml: [functions.\"my-job\"] schedule = \"@daily\" (function name without extension).","Test locally: netlify dev plus 'netlify functions:invoke my-job' — schedules do not fire automatically in local dev.","Deploy to production. Verify runs in the Netlify UI function logs.","Docs: https://docs.netlify.com/build/functions/scheduled-functions/"],"gotchas":["Scheduled functions only run on schedule for PUBLISHED deploys — Deploy Previews and branch deploys never trigger them automatically.","They cannot be invoked via a public URL; the only payload is a JSON body with next_run (ISO-8601 timestamp of the next scheduled run) — no custom request data.","Execution limit is 30 seconds — long jobs get killed; split work or hand off to a background process.","Schedules run in UTC; convert local cron expectations accordingly."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T03:44:29.329Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T03:44:29.329Z"},"url":"https://mcp.waymark.network/r/15c4ef02-46ee-4966-a393-56130bd0c506"}