[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation_en":3,"/docs/features/cron-jobs-data":144},[4,16,91,117,127],{"title":5,"path":6,"stem":7,"children":8,"icon":15},"Getting Started","/docs/get-started","docs/1.get-started/1.index",[9,11],{"title":10,"path":6,"stem":7},"Introduction",{"title":12,"path":13,"stem":14},"Setup","/docs/get-started/setup","docs/1.get-started/2.setup","mage:fast-forward-fill",{"title":17,"icon":18,"path":19,"stem":20,"children":21,"page":90},"Features","ic:baseline-cable","/docs/features","docs/2.features",[22,26,30,34,38,42,46,50,54,58,62,66,70,74,78,82,86],{"title":23,"path":24,"stem":25},"Database","/docs/features/database","docs/2.features/01.database",{"title":27,"path":28,"stem":29},"Authentication","/docs/features/auth","docs/2.features/02.auth",{"title":31,"path":32,"stem":33},"Payments","/docs/features/payments","docs/2.features/03.payments",{"title":35,"path":36,"stem":37},"Admin Panel","/docs/features/admin-panel","docs/2.features/04.admin-panel",{"title":39,"path":40,"stem":41},"AI","/docs/features/ai","docs/2.features/05.ai",{"title":43,"path":44,"stem":45},"Customization","/docs/features/customization","docs/2.features/06.customization",{"title":47,"path":48,"stem":49},"Storage","/docs/features/storage","docs/2.features/07.storage",{"title":51,"path":52,"stem":53},"Email","/docs/features/email","docs/2.features/08.email",{"title":55,"path":56,"stem":57},"Languages","/docs/features/languages","docs/2.features/09.languages",{"title":59,"path":60,"stem":61},"SEO","/docs/features/seo","docs/2.features/10.seo",{"title":63,"path":64,"stem":65},"Blogs","/docs/features/blogs","docs/2.features/11.blogs",{"title":67,"path":68,"stem":69},"Documentation","/docs/features/documentation","docs/2.features/12.documentation",{"title":71,"path":72,"stem":73},"Cron Jobs","/docs/features/cron-jobs","docs/2.features/13.cron-jobs",{"title":75,"path":76,"stem":77},"Error Handling","/docs/features/error-handling","docs/2.features/14.error-handling",{"title":79,"path":80,"stem":81},"Analytics","/docs/features/analytics","docs/2.features/15.analytics",{"title":83,"path":84,"stem":85},"PWA","/docs/features/pwa","docs/2.features/15.pwa",{"title":87,"path":88,"stem":89},"Customer Support","/docs/features/customer-support","docs/2.features/16.customer-support",false,{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":90},"Tutorials","ic:baseline-library-books","/docs/tutorials","docs/3.tutorials",[97,101,105,109,113],{"title":98,"path":99,"stem":100},"Project Structure","/docs/tutorials/project-structure","docs/3.tutorials/1.project-structure",{"title":102,"path":103,"stem":104},"Page Routes","/docs/tutorials/page-routes","docs/3.tutorials/2.page-routes",{"title":106,"path":107,"stem":108},"API Calls","/docs/tutorials/api-calls","docs/3.tutorials/3.api-calls",{"title":110,"path":111,"stem":112},"State Management","/docs/tutorials/state-management","docs/3.tutorials/4.state-management",{"title":114,"path":115,"stem":116},"Legal Pages by GPT","/docs/tutorials/legal-pages-by-gpt","docs/3.tutorials/5.legal-pages-by-gpt",{"title":118,"icon":119,"path":120,"stem":121,"children":122,"page":90},"Formatting & Linting","ic:baseline-format-align-left","/docs/formatting-and-linting","docs/4.formatting-and-linting",[123],{"title":124,"path":125,"stem":126},"Overview","/docs/formatting-and-linting/overview","docs/4.formatting-and-linting/1.overview",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":90},"Deployment","ic:baseline-rocket-launch","/docs/deployment","docs/5.deployment",[133,136,140],{"title":124,"path":134,"stem":135},"/docs/deployment/overview","docs/5.deployment/1.overview",{"title":137,"path":138,"stem":139},"Vercel","/docs/deployment/vercel","docs/5.deployment/2.vercel",{"title":141,"path":142,"stem":143},"Cloudflare Workers","/docs/deployment/cloudflare","docs/5.deployment/3.cloudflare",{"page":145,"surround":407},{"id":146,"title":71,"body":147,"description":399,"extension":400,"head":401,"meta":402,"navigation":403,"ogImage":401,"path":72,"robots":401,"schemaOrg":401,"seo":404,"sitemap":405,"stem":73,"__hash__":406},"docs_en/docs/2.features/13.cron-jobs.md",{"type":148,"value":149,"toc":392},"minimark",[150,155,171,175,339,343,369,373,388],[151,152,154],"h2",{"id":153},"tools","Tools",[156,157,158],"ul",{},[159,160,161,170],"li",{},[162,163,164],"strong",{},[165,166,169],"a",{"href":167,"target":168},"https://cron-job.org/en/","_blank","cron-job.org",": External service to schedule jobs by calling your API endpoints.",[151,172,174],{"id":173},"setup-run-cron-jobs","Setup & Run Cron Jobs",[176,177,178,203,240,289],"ol",{},[159,179,180,183],{},[162,181,182],{},"Set CRON_SECRET",[156,184,185,200],{},[159,186,187,188],{},"Add an environment variable to secure your cron endpoints:\n",[189,190,197],"pre",{"className":191,"code":193,"filename":194,"language":195,"meta":196},[192],"language-text","CRON_SECRET=\"your-secret-key\"\n",".env","text","",[198,199,193],"code",{"__ignoreMap":196},[159,201,202],{},"Use any strong key you like or generate one with a password generator.",[159,204,205,208],{},[162,206,207],{},"Add a Cron Job",[156,209,210,228],{},[159,211,212,213,216,217,220,221],{},"Create a file in ",[198,214,215],{},"/server/jobs/",", e.g., ",[198,218,219],{},"sendReminderEmails.ts",":",[189,222,226],{"className":223,"code":224,"filename":225,"language":195,"meta":196},[192],"export async function sendReminderEmails() {\n  console.log('[CRON] Running job...');\n  // Add your logic (DB updates, notifications, etc.)\n}\n","server/jobs/sendReminderEmails.ts",[198,227,224],{"__ignoreMap":196},[159,229,230,231,220,234],{},"Register it in ",[198,232,233],{},"server/jobs/list.ts",[189,235,238],{"className":236,"code":237,"filename":233,"language":195,"meta":196},[192],"import { sendReminderEmails } from './sendReminderEmails';\n\nconst JOBS: any = { sendReminderEmails };\n\nexport function getJobModules(name: string) {\n  return JOBS[name] ?? null;\n}\n",[198,239,237],{"__ignoreMap":196},[159,241,242,245],{},[162,243,244],{},"Schedule the Job",[156,246,247,256],{},[159,248,249,250],{},"Trigger your job via the API endpoint:\n",[189,251,254],{"className":252,"code":253,"language":195},[192],"https://your-site.com/api/cron/sendReminderEmails\n",[198,255,253],{"__ignoreMap":196},[159,257,258,259],{},"Create a cron-job.org task:\n",[156,260,261,267,277],{},[159,262,263,266],{},[162,264,265],{},"URL",": same as above",[159,268,269,272,273,276],{},[162,270,271],{},"Execution schedule",": e.g., ",[198,274,275],{},"0 8 * * *"," (runs daily at 8 AM)",[159,278,279,282,283],{},[162,280,281],{},"HTTP Header",":\n",[189,284,287],{"className":285,"code":286,"language":195},[192],"X-Cron-Secret: your-secret-key\n",[198,288,286],{"__ignoreMap":196},[159,290,291,294],{},[162,292,293],{},"Verify",[156,295,296,303],{},[159,297,298,299,302],{},"Check server logs for ",[198,300,301],{},"[CRON]"," messages.",[159,304,305,306],{},"Or test endpoint directly with curl:\n",[189,307,311],{"className":308,"code":309,"language":310,"meta":196,"style":196},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -H \"X-Cron-Secret: your-secret-key\" https://your-site.com/api/cron/sendReminderEmails\n","bash",[198,312,313],{"__ignoreMap":196},[314,315,318,322,326,330,333,336],"span",{"class":316,"line":317},"line",1,[314,319,321],{"class":320},"sBMFI","curl",[314,323,325],{"class":324},"sfazB"," -H",[314,327,329],{"class":328},"sMK4o"," \"",[314,331,332],{"class":324},"X-Cron-Secret: your-secret-key",[314,334,335],{"class":328},"\"",[314,337,338],{"class":324}," https://your-site.com/api/cron/sendReminderEmails\n",[151,340,342],{"id":341},"why-use-cron-joborg","Why Use cron-job.org?",[156,344,345,352,359,366],{},[159,346,347,348,351],{},"No need to install ",[198,349,350],{},"node-cron"," or run background workers.",[159,353,354,355,358],{},"Works with ",[162,356,357],{},"serverless platforms"," like Vercel, Netlify, or Cloudflare.",[159,360,361,362,365],{},"Secure with your custom ",[198,363,364],{},"X-Cron-Secret",".",[159,367,368],{},"Easy to schedule and manage without touching your app’s main code.",[151,370,372],{"id":371},"example-adding-a-new-job","Example: Adding a New Job",[156,374,375,385],{},[159,376,377,378,380,381,384],{},"Just create a new file in ",[198,379,215],{},", register it in ",[198,382,383],{},"list.ts",", and schedule it on cron-job.org like above.",[159,386,387],{},"You can add unlimited jobs following the same pattern.",[389,390,391],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":196,"searchDepth":393,"depth":393,"links":394},2,[395,396,397,398],{"id":153,"depth":393,"text":154},{"id":173,"depth":393,"text":174},{"id":341,"depth":393,"text":342},{"id":371,"depth":393,"text":372},"Schedule automated tasks like sending reminder emails with ShipAhead’s cron setup.","md",null,{},true,{"title":71,"description":399},{"loc":72},"Lf6KR4A_yKWZAJQqIsFQByzoZpmvd2z2IYZUIulBXQw",[408,410],{"title":67,"path":68,"stem":69,"description":409,"children":-1},"Create and manage documentation with multi-language support and SEO'",{"title":75,"path":76,"stem":77,"description":411,"children":-1},"Show friendly error pages for issues like 404 or 500 in your app."]