[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-encore-encore-cron":3,"mdc-ay86wh-key":40,"related-org-encore-encore-cron":876,"related-repo-encore-encore-cron":1041},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":35,"sourceUrl":38,"mdContent":39},"encore-cron","schedule recurring jobs in Encore.ts","Schedule periodic \u002F recurring work in Encore.ts using `CronJob` from `encore.dev\u002Fcron`. Covers `every: \"1h\"` interval syntax and `schedule: \"0 9 * * 1\"` cron expressions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"encore","Encore","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fencore.png","encoredev",[13,17,20,23,24],{"name":14,"slug":15,"type":16},"Backend","backend","tag",{"name":18,"slug":19,"type":16},"Automation","automation",{"name":21,"slug":22,"type":16},"TypeScript","typescript",{"name":9,"slug":8,"type":16},{"name":25,"slug":26,"type":16},"Scheduling","scheduling",26,"https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills","2026-05-16T05:59:54.146651",null,5,[33,34],"claude-code","skills",{"repoUrl":28,"stars":27,"forks":31,"topics":36,"description":37},[33,34],"Agent Skills for development with Encore.","https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills\u002Ftree\u002FHEAD\u002Fencore\u002Fcron","---\nname: encore-cron\ndescription: >-\n  Schedule periodic \u002F recurring work in Encore.ts using `CronJob` from `encore.dev\u002Fcron`. Covers `every: \"1h\"` interval syntax and `schedule: \"0 9 * * 1\"` cron expressions.\nwhen_to_use: >-\n  User wants to run a job on a schedule — anything with the words schedule, scheduled, daily, hourly, weekly, periodic, recurring, every N minutes\u002Fhours, \"at HH:MM UTC\", midnight, batch job, aggregation job, nightly, cleanup job, or background work that runs on a timer rather than in response to a request. Trigger phrases: \"every day at 02:00 UTC\", \"daily aggregation\", \"run hourly\", \"scheduled task\", \"cron\", \"nightly cleanup\", \"on a schedule\".\n---\n\n# Encore Cron Jobs\n\n## Instructions\n\nA `CronJob` declaration in Encore.ts ties a schedule to an existing `api(...)` endpoint. The endpoint runs at the chosen cadence. Declare the `CronJob` at package level — not inside a function.\n\n```typescript\nimport { CronJob } from \"encore.dev\u002Fcron\";\nimport { api } from \"encore.dev\u002Fapi\";\n\n\u002F\u002F 1. The endpoint to call (typically internal: expose: false)\nexport const aggregateDailyOrders = api(\n  { expose: false },\n  async (): Promise\u003Cvoid> => {\n    \u002F\u002F Aggregation logic\n  }\n);\n\n\u002F\u002F 2. Package-level cron declaration\nconst _ = new CronJob(\"aggregate-daily-orders\", {\n  title: \"Aggregate orders for the previous day\",\n  schedule: \"0 2 * * *\",  \u002F\u002F 02:00 UTC every day\n  endpoint: aggregateDailyOrders,\n});\n```\n\n## Schedule Formats\n\n| Field | Example | Description |\n|---|---|---|\n| `every` | `\"1h\"`, `\"30m\"`, `\"6h\"` | Simple interval. **Must divide 24h evenly** — `\"7h\"` is invalid. |\n| `schedule` | `\"0 9 * * 1\"` | Standard cron expression (5 fields, UTC). |\n\n### Common cron expressions\n\n| Cron | Meaning |\n|---|---|\n| `\"0 * * * *\"` | Every hour, on the hour |\n| `\"0 2 * * *\"` | Daily at 02:00 UTC |\n| `\"0 0 * * 0\"` | Weekly on Sunday at midnight UTC |\n| `\"0 4 15 * *\"` | 04:00 UTC on the 15th of each month |\n\n## Important behaviour\n\n- **Cron jobs do not execute when running locally with `encore run`.** Only deployed environments fire crons.\n- The cron endpoint should be `expose: false` so it can't be triggered externally — only the cron scheduler should call it.\n- All times in `schedule` are UTC. Convert from local time when designing the schedule.\n- The endpoint must already exist at module load — declare it before the `CronJob`.\n\n## Guidelines\n\n- Use `every` for \"run on a regular interval\" (must divide 24h).\n- Use `schedule` for specific times of day or days of week.\n- Keep endpoint logic idempotent: a cron may fire late or be retried in a redeploy window.\n- For event-driven background work (not time-driven), use the `encore-pubsub` skill instead.\n",{"data":41,"body":43},{"name":4,"description":6,"when_to_use":42},"User wants to run a job on a schedule — anything with the words schedule, scheduled, daily, hourly, weekly, periodic, recurring, every N minutes\u002Fhours, \"at HH:MM UTC\", midnight, batch job, aggregation job, nightly, cleanup job, or background work that runs on a timer rather than in response to a request. Trigger phrases: \"every day at 02:00 UTC\", \"daily aggregation\", \"run hourly\", \"scheduled task\", \"cron\", \"nightly cleanup\", \"on a schedule\".",{"type":44,"children":45},"root",[46,55,62,92,536,542,658,665,755,761,820,826,870],{"type":47,"tag":48,"props":49,"children":51},"element","h1",{"id":50},"encore-cron-jobs",[52],{"type":53,"value":54},"text","Encore Cron Jobs",{"type":47,"tag":56,"props":57,"children":59},"h2",{"id":58},"instructions",[60],{"type":53,"value":61},"Instructions",{"type":47,"tag":63,"props":64,"children":65},"p",{},[66,68,75,77,83,85,90],{"type":53,"value":67},"A ",{"type":47,"tag":69,"props":70,"children":72},"code",{"className":71},[],[73],{"type":53,"value":74},"CronJob",{"type":53,"value":76}," declaration in Encore.ts ties a schedule to an existing ",{"type":47,"tag":69,"props":78,"children":80},{"className":79},[],[81],{"type":53,"value":82},"api(...)",{"type":53,"value":84}," endpoint. The endpoint runs at the chosen cadence. Declare the ",{"type":47,"tag":69,"props":86,"children":88},{"className":87},[],[89],{"type":53,"value":74},{"type":53,"value":91}," at package level — not inside a function.",{"type":47,"tag":93,"props":94,"children":98},"pre",{"className":95,"code":96,"language":22,"meta":97,"style":97},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { CronJob } from \"encore.dev\u002Fcron\";\nimport { api } from \"encore.dev\u002Fapi\";\n\n\u002F\u002F 1. The endpoint to call (typically internal: expose: false)\nexport const aggregateDailyOrders = api(\n  { expose: false },\n  async (): Promise\u003Cvoid> => {\n    \u002F\u002F Aggregation logic\n  }\n);\n\n\u002F\u002F 2. Package-level cron declaration\nconst _ = new CronJob(\"aggregate-daily-orders\", {\n  title: \"Aggregate orders for the previous day\",\n  schedule: \"0 2 * * *\",  \u002F\u002F 02:00 UTC every day\n  endpoint: aggregateDailyOrders,\n});\n","",[99],{"type":47,"tag":69,"props":100,"children":101},{"__ignoreMap":97},[102,157,199,209,219,253,284,329,338,347,360,368,377,431,462,497,519],{"type":47,"tag":103,"props":104,"children":107},"span",{"class":105,"line":106},"line",1,[108,114,120,126,131,136,141,147,152],{"type":47,"tag":103,"props":109,"children":111},{"style":110},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[112],{"type":53,"value":113},"import",{"type":47,"tag":103,"props":115,"children":117},{"style":116},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[118],{"type":53,"value":119}," {",{"type":47,"tag":103,"props":121,"children":123},{"style":122},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[124],{"type":53,"value":125}," CronJob",{"type":47,"tag":103,"props":127,"children":128},{"style":116},[129],{"type":53,"value":130}," }",{"type":47,"tag":103,"props":132,"children":133},{"style":110},[134],{"type":53,"value":135}," from",{"type":47,"tag":103,"props":137,"children":138},{"style":116},[139],{"type":53,"value":140}," \"",{"type":47,"tag":103,"props":142,"children":144},{"style":143},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[145],{"type":53,"value":146},"encore.dev\u002Fcron",{"type":47,"tag":103,"props":148,"children":149},{"style":116},[150],{"type":53,"value":151},"\"",{"type":47,"tag":103,"props":153,"children":154},{"style":116},[155],{"type":53,"value":156},";\n",{"type":47,"tag":103,"props":158,"children":160},{"class":105,"line":159},2,[161,165,169,174,178,182,186,191,195],{"type":47,"tag":103,"props":162,"children":163},{"style":110},[164],{"type":53,"value":113},{"type":47,"tag":103,"props":166,"children":167},{"style":116},[168],{"type":53,"value":119},{"type":47,"tag":103,"props":170,"children":171},{"style":122},[172],{"type":53,"value":173}," api",{"type":47,"tag":103,"props":175,"children":176},{"style":116},[177],{"type":53,"value":130},{"type":47,"tag":103,"props":179,"children":180},{"style":110},[181],{"type":53,"value":135},{"type":47,"tag":103,"props":183,"children":184},{"style":116},[185],{"type":53,"value":140},{"type":47,"tag":103,"props":187,"children":188},{"style":143},[189],{"type":53,"value":190},"encore.dev\u002Fapi",{"type":47,"tag":103,"props":192,"children":193},{"style":116},[194],{"type":53,"value":151},{"type":47,"tag":103,"props":196,"children":197},{"style":116},[198],{"type":53,"value":156},{"type":47,"tag":103,"props":200,"children":202},{"class":105,"line":201},3,[203],{"type":47,"tag":103,"props":204,"children":206},{"emptyLinePlaceholder":205},true,[207],{"type":53,"value":208},"\n",{"type":47,"tag":103,"props":210,"children":212},{"class":105,"line":211},4,[213],{"type":47,"tag":103,"props":214,"children":216},{"style":215},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[217],{"type":53,"value":218},"\u002F\u002F 1. The endpoint to call (typically internal: expose: false)\n",{"type":47,"tag":103,"props":220,"children":221},{"class":105,"line":31},[222,227,233,238,243,248],{"type":47,"tag":103,"props":223,"children":224},{"style":110},[225],{"type":53,"value":226},"export",{"type":47,"tag":103,"props":228,"children":230},{"style":229},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[231],{"type":53,"value":232}," const",{"type":47,"tag":103,"props":234,"children":235},{"style":122},[236],{"type":53,"value":237}," aggregateDailyOrders ",{"type":47,"tag":103,"props":239,"children":240},{"style":116},[241],{"type":53,"value":242},"=",{"type":47,"tag":103,"props":244,"children":246},{"style":245},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[247],{"type":53,"value":173},{"type":47,"tag":103,"props":249,"children":250},{"style":122},[251],{"type":53,"value":252},"(\n",{"type":47,"tag":103,"props":254,"children":256},{"class":105,"line":255},6,[257,262,268,273,279],{"type":47,"tag":103,"props":258,"children":259},{"style":116},[260],{"type":53,"value":261},"  {",{"type":47,"tag":103,"props":263,"children":265},{"style":264},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[266],{"type":53,"value":267}," expose",{"type":47,"tag":103,"props":269,"children":270},{"style":116},[271],{"type":53,"value":272},":",{"type":47,"tag":103,"props":274,"children":276},{"style":275},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[277],{"type":53,"value":278}," false",{"type":47,"tag":103,"props":280,"children":281},{"style":116},[282],{"type":53,"value":283}," },\n",{"type":47,"tag":103,"props":285,"children":287},{"class":105,"line":286},7,[288,293,298,304,309,314,319,324],{"type":47,"tag":103,"props":289,"children":290},{"style":229},[291],{"type":53,"value":292},"  async",{"type":47,"tag":103,"props":294,"children":295},{"style":116},[296],{"type":53,"value":297}," ():",{"type":47,"tag":103,"props":299,"children":301},{"style":300},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[302],{"type":53,"value":303}," Promise",{"type":47,"tag":103,"props":305,"children":306},{"style":116},[307],{"type":53,"value":308},"\u003C",{"type":47,"tag":103,"props":310,"children":311},{"style":300},[312],{"type":53,"value":313},"void",{"type":47,"tag":103,"props":315,"children":316},{"style":116},[317],{"type":53,"value":318},">",{"type":47,"tag":103,"props":320,"children":321},{"style":229},[322],{"type":53,"value":323}," =>",{"type":47,"tag":103,"props":325,"children":326},{"style":116},[327],{"type":53,"value":328}," {\n",{"type":47,"tag":103,"props":330,"children":332},{"class":105,"line":331},8,[333],{"type":47,"tag":103,"props":334,"children":335},{"style":215},[336],{"type":53,"value":337},"    \u002F\u002F Aggregation logic\n",{"type":47,"tag":103,"props":339,"children":341},{"class":105,"line":340},9,[342],{"type":47,"tag":103,"props":343,"children":344},{"style":116},[345],{"type":53,"value":346},"  }\n",{"type":47,"tag":103,"props":348,"children":350},{"class":105,"line":349},10,[351,356],{"type":47,"tag":103,"props":352,"children":353},{"style":122},[354],{"type":53,"value":355},")",{"type":47,"tag":103,"props":357,"children":358},{"style":116},[359],{"type":53,"value":156},{"type":47,"tag":103,"props":361,"children":363},{"class":105,"line":362},11,[364],{"type":47,"tag":103,"props":365,"children":366},{"emptyLinePlaceholder":205},[367],{"type":53,"value":208},{"type":47,"tag":103,"props":369,"children":371},{"class":105,"line":370},12,[372],{"type":47,"tag":103,"props":373,"children":374},{"style":215},[375],{"type":53,"value":376},"\u002F\u002F 2. Package-level cron declaration\n",{"type":47,"tag":103,"props":378,"children":380},{"class":105,"line":379},13,[381,386,391,395,400,404,409,413,418,422,427],{"type":47,"tag":103,"props":382,"children":383},{"style":229},[384],{"type":53,"value":385},"const",{"type":47,"tag":103,"props":387,"children":388},{"style":122},[389],{"type":53,"value":390}," _ ",{"type":47,"tag":103,"props":392,"children":393},{"style":116},[394],{"type":53,"value":242},{"type":47,"tag":103,"props":396,"children":397},{"style":116},[398],{"type":53,"value":399}," new",{"type":47,"tag":103,"props":401,"children":402},{"style":245},[403],{"type":53,"value":125},{"type":47,"tag":103,"props":405,"children":406},{"style":122},[407],{"type":53,"value":408},"(",{"type":47,"tag":103,"props":410,"children":411},{"style":116},[412],{"type":53,"value":151},{"type":47,"tag":103,"props":414,"children":415},{"style":143},[416],{"type":53,"value":417},"aggregate-daily-orders",{"type":47,"tag":103,"props":419,"children":420},{"style":116},[421],{"type":53,"value":151},{"type":47,"tag":103,"props":423,"children":424},{"style":116},[425],{"type":53,"value":426},",",{"type":47,"tag":103,"props":428,"children":429},{"style":116},[430],{"type":53,"value":328},{"type":47,"tag":103,"props":432,"children":434},{"class":105,"line":433},14,[435,440,444,448,453,457],{"type":47,"tag":103,"props":436,"children":437},{"style":264},[438],{"type":53,"value":439},"  title",{"type":47,"tag":103,"props":441,"children":442},{"style":116},[443],{"type":53,"value":272},{"type":47,"tag":103,"props":445,"children":446},{"style":116},[447],{"type":53,"value":140},{"type":47,"tag":103,"props":449,"children":450},{"style":143},[451],{"type":53,"value":452},"Aggregate orders for the previous day",{"type":47,"tag":103,"props":454,"children":455},{"style":116},[456],{"type":53,"value":151},{"type":47,"tag":103,"props":458,"children":459},{"style":116},[460],{"type":53,"value":461},",\n",{"type":47,"tag":103,"props":463,"children":465},{"class":105,"line":464},15,[466,471,475,479,484,488,492],{"type":47,"tag":103,"props":467,"children":468},{"style":264},[469],{"type":53,"value":470},"  schedule",{"type":47,"tag":103,"props":472,"children":473},{"style":116},[474],{"type":53,"value":272},{"type":47,"tag":103,"props":476,"children":477},{"style":116},[478],{"type":53,"value":140},{"type":47,"tag":103,"props":480,"children":481},{"style":143},[482],{"type":53,"value":483},"0 2 * * *",{"type":47,"tag":103,"props":485,"children":486},{"style":116},[487],{"type":53,"value":151},{"type":47,"tag":103,"props":489,"children":490},{"style":116},[491],{"type":53,"value":426},{"type":47,"tag":103,"props":493,"children":494},{"style":215},[495],{"type":53,"value":496},"  \u002F\u002F 02:00 UTC every day\n",{"type":47,"tag":103,"props":498,"children":500},{"class":105,"line":499},16,[501,506,510,515],{"type":47,"tag":103,"props":502,"children":503},{"style":264},[504],{"type":53,"value":505},"  endpoint",{"type":47,"tag":103,"props":507,"children":508},{"style":116},[509],{"type":53,"value":272},{"type":47,"tag":103,"props":511,"children":512},{"style":122},[513],{"type":53,"value":514}," aggregateDailyOrders",{"type":47,"tag":103,"props":516,"children":517},{"style":116},[518],{"type":53,"value":461},{"type":47,"tag":103,"props":520,"children":522},{"class":105,"line":521},17,[523,528,532],{"type":47,"tag":103,"props":524,"children":525},{"style":116},[526],{"type":53,"value":527},"}",{"type":47,"tag":103,"props":529,"children":530},{"style":122},[531],{"type":53,"value":355},{"type":47,"tag":103,"props":533,"children":534},{"style":116},[535],{"type":53,"value":156},{"type":47,"tag":56,"props":537,"children":539},{"id":538},"schedule-formats",[540],{"type":53,"value":541},"Schedule Formats",{"type":47,"tag":543,"props":544,"children":545},"table",{},[546,570],{"type":47,"tag":547,"props":548,"children":549},"thead",{},[550],{"type":47,"tag":551,"props":552,"children":553},"tr",{},[554,560,565],{"type":47,"tag":555,"props":556,"children":557},"th",{},[558],{"type":53,"value":559},"Field",{"type":47,"tag":555,"props":561,"children":562},{},[563],{"type":53,"value":564},"Example",{"type":47,"tag":555,"props":566,"children":567},{},[568],{"type":53,"value":569},"Description",{"type":47,"tag":571,"props":572,"children":573},"tbody",{},[574,632],{"type":47,"tag":551,"props":575,"children":576},{},[577,587,611],{"type":47,"tag":578,"props":579,"children":580},"td",{},[581],{"type":47,"tag":69,"props":582,"children":584},{"className":583},[],[585],{"type":53,"value":586},"every",{"type":47,"tag":578,"props":588,"children":589},{},[590,596,598,604,605],{"type":47,"tag":69,"props":591,"children":593},{"className":592},[],[594],{"type":53,"value":595},"\"1h\"",{"type":53,"value":597},", ",{"type":47,"tag":69,"props":599,"children":601},{"className":600},[],[602],{"type":53,"value":603},"\"30m\"",{"type":53,"value":597},{"type":47,"tag":69,"props":606,"children":608},{"className":607},[],[609],{"type":53,"value":610},"\"6h\"",{"type":47,"tag":578,"props":612,"children":613},{},[614,616,622,624,630],{"type":53,"value":615},"Simple interval. ",{"type":47,"tag":617,"props":618,"children":619},"strong",{},[620],{"type":53,"value":621},"Must divide 24h evenly",{"type":53,"value":623}," — ",{"type":47,"tag":69,"props":625,"children":627},{"className":626},[],[628],{"type":53,"value":629},"\"7h\"",{"type":53,"value":631}," is invalid.",{"type":47,"tag":551,"props":633,"children":634},{},[635,644,653],{"type":47,"tag":578,"props":636,"children":637},{},[638],{"type":47,"tag":69,"props":639,"children":641},{"className":640},[],[642],{"type":53,"value":643},"schedule",{"type":47,"tag":578,"props":645,"children":646},{},[647],{"type":47,"tag":69,"props":648,"children":650},{"className":649},[],[651],{"type":53,"value":652},"\"0 9 * * 1\"",{"type":47,"tag":578,"props":654,"children":655},{},[656],{"type":53,"value":657},"Standard cron expression (5 fields, UTC).",{"type":47,"tag":659,"props":660,"children":662},"h3",{"id":661},"common-cron-expressions",[663],{"type":53,"value":664},"Common cron expressions",{"type":47,"tag":543,"props":666,"children":667},{},[668,684],{"type":47,"tag":547,"props":669,"children":670},{},[671],{"type":47,"tag":551,"props":672,"children":673},{},[674,679],{"type":47,"tag":555,"props":675,"children":676},{},[677],{"type":53,"value":678},"Cron",{"type":47,"tag":555,"props":680,"children":681},{},[682],{"type":53,"value":683},"Meaning",{"type":47,"tag":571,"props":685,"children":686},{},[687,704,721,738],{"type":47,"tag":551,"props":688,"children":689},{},[690,699],{"type":47,"tag":578,"props":691,"children":692},{},[693],{"type":47,"tag":69,"props":694,"children":696},{"className":695},[],[697],{"type":53,"value":698},"\"0 * * * *\"",{"type":47,"tag":578,"props":700,"children":701},{},[702],{"type":53,"value":703},"Every hour, on the hour",{"type":47,"tag":551,"props":705,"children":706},{},[707,716],{"type":47,"tag":578,"props":708,"children":709},{},[710],{"type":47,"tag":69,"props":711,"children":713},{"className":712},[],[714],{"type":53,"value":715},"\"0 2 * * *\"",{"type":47,"tag":578,"props":717,"children":718},{},[719],{"type":53,"value":720},"Daily at 02:00 UTC",{"type":47,"tag":551,"props":722,"children":723},{},[724,733],{"type":47,"tag":578,"props":725,"children":726},{},[727],{"type":47,"tag":69,"props":728,"children":730},{"className":729},[],[731],{"type":53,"value":732},"\"0 0 * * 0\"",{"type":47,"tag":578,"props":734,"children":735},{},[736],{"type":53,"value":737},"Weekly on Sunday at midnight UTC",{"type":47,"tag":551,"props":739,"children":740},{},[741,750],{"type":47,"tag":578,"props":742,"children":743},{},[744],{"type":47,"tag":69,"props":745,"children":747},{"className":746},[],[748],{"type":53,"value":749},"\"0 4 15 * *\"",{"type":47,"tag":578,"props":751,"children":752},{},[753],{"type":53,"value":754},"04:00 UTC on the 15th of each month",{"type":47,"tag":56,"props":756,"children":758},{"id":757},"important-behaviour",[759],{"type":53,"value":760},"Important behaviour",{"type":47,"tag":762,"props":763,"children":764},"ul",{},[765,784,797,809],{"type":47,"tag":766,"props":767,"children":768},"li",{},[769,782],{"type":47,"tag":617,"props":770,"children":771},{},[772,774,780],{"type":53,"value":773},"Cron jobs do not execute when running locally with ",{"type":47,"tag":69,"props":775,"children":777},{"className":776},[],[778],{"type":53,"value":779},"encore run",{"type":53,"value":781},".",{"type":53,"value":783}," Only deployed environments fire crons.",{"type":47,"tag":766,"props":785,"children":786},{},[787,789,795],{"type":53,"value":788},"The cron endpoint should be ",{"type":47,"tag":69,"props":790,"children":792},{"className":791},[],[793],{"type":53,"value":794},"expose: false",{"type":53,"value":796}," so it can't be triggered externally — only the cron scheduler should call it.",{"type":47,"tag":766,"props":798,"children":799},{},[800,802,807],{"type":53,"value":801},"All times in ",{"type":47,"tag":69,"props":803,"children":805},{"className":804},[],[806],{"type":53,"value":643},{"type":53,"value":808}," are UTC. Convert from local time when designing the schedule.",{"type":47,"tag":766,"props":810,"children":811},{},[812,814,819],{"type":53,"value":813},"The endpoint must already exist at module load — declare it before the ",{"type":47,"tag":69,"props":815,"children":817},{"className":816},[],[818],{"type":53,"value":74},{"type":53,"value":781},{"type":47,"tag":56,"props":821,"children":823},{"id":822},"guidelines",[824],{"type":53,"value":825},"Guidelines",{"type":47,"tag":762,"props":827,"children":828},{},[829,841,852,857],{"type":47,"tag":766,"props":830,"children":831},{},[832,834,839],{"type":53,"value":833},"Use ",{"type":47,"tag":69,"props":835,"children":837},{"className":836},[],[838],{"type":53,"value":586},{"type":53,"value":840}," for \"run on a regular interval\" (must divide 24h).",{"type":47,"tag":766,"props":842,"children":843},{},[844,845,850],{"type":53,"value":833},{"type":47,"tag":69,"props":846,"children":848},{"className":847},[],[849],{"type":53,"value":643},{"type":53,"value":851}," for specific times of day or days of week.",{"type":47,"tag":766,"props":853,"children":854},{},[855],{"type":53,"value":856},"Keep endpoint logic idempotent: a cron may fire late or be retried in a redeploy window.",{"type":47,"tag":766,"props":858,"children":859},{},[860,862,868],{"type":53,"value":861},"For event-driven background work (not time-driven), use the ",{"type":47,"tag":69,"props":863,"children":865},{"className":864},[],[866],{"type":53,"value":867},"encore-pubsub",{"type":53,"value":869}," skill instead.",{"type":47,"tag":871,"props":872,"children":873},"style",{},[874],{"type":53,"value":875},"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);}",{"items":877,"total":1040},[878,890,902,918,934,946,954,969,986,1003,1015,1026],{"slug":879,"name":879,"fn":880,"description":881,"org":882,"tags":883,"stars":27,"repoUrl":28,"updatedAt":889},"encore-api","build type-safe APIs with Encore","Define typed API endpoints in Encore.ts using `api(...)` from `encore.dev\u002Fapi`. Covers typed request\u002Fresponse interfaces, path\u002Fquery\u002Fheader\u002Fcookie params, request validation, and `APIError`. For raw endpoints (`api.raw()`) and inbound webhooks, use `encore-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[884,887,888],{"name":885,"slug":886,"type":16},"API Development","api-development",{"name":9,"slug":8,"type":16},{"name":21,"slug":22,"type":16},"2026-04-06T18:09:46.044101",{"slug":891,"name":891,"fn":892,"description":893,"org":894,"tags":895,"stars":27,"repoUrl":28,"updatedAt":901},"encore-auth","implement Encore.ts authentication","Protect Encore.ts endpoints with authentication and authorize callers. Covers `authHandler`, `Gateway`, `getAuthData`, and `auth: true`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[896,899,900],{"name":897,"slug":898,"type":16},"Auth","auth",{"name":9,"slug":8,"type":16},{"name":21,"slug":22,"type":16},"2026-04-06T18:09:47.336322",{"slug":903,"name":903,"fn":904,"description":905,"org":906,"tags":907,"stars":27,"repoUrl":28,"updatedAt":917},"encore-bucket","store files in Encore.ts buckets","Store unstructured files in Encore.ts using `Bucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[908,909,910,913,916],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":911,"slug":912,"type":16},"File Storage","file-storage",{"name":914,"slug":915,"type":16},"File Uploads","file-uploads",{"name":21,"slug":22,"type":16},"2026-05-16T05:59:52.813772",{"slug":919,"name":919,"fn":920,"description":921,"org":922,"tags":923,"stars":27,"repoUrl":28,"updatedAt":933},"encore-cache","cache data in Redis with Encore.ts","Cache data in Redis from Encore.ts using `CacheCluster` and typed keyspaces from `encore.dev\u002Fstorage\u002Fcache`. Type-safe key\u002Fvalue access with TTLs, atomic increments, and per-keyspace data shapes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[924,925,928,929,932],{"name":14,"slug":15,"type":16},{"name":926,"slug":927,"type":16},"Caching","caching",{"name":9,"slug":8,"type":16},{"name":930,"slug":931,"type":16},"Redis","redis",{"name":21,"slug":22,"type":16},"2026-05-16T05:59:56.808328",{"slug":935,"name":935,"fn":936,"description":937,"org":938,"tags":939,"stars":27,"repoUrl":28,"updatedAt":945},"encore-code-review","review Encore.ts code","Review existing Encore.ts code for best practices and common anti-patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[940,943,944],{"name":941,"slug":942,"type":16},"Code Review","code-review",{"name":9,"slug":8,"type":16},{"name":21,"slug":22,"type":16},"2026-04-06T18:10:01.123999",{"slug":4,"name":4,"fn":5,"description":6,"org":947,"tags":948,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[949,950,951,952,953],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":25,"slug":26,"type":16},{"name":21,"slug":22,"type":16},{"slug":955,"name":955,"fn":956,"description":957,"org":958,"tags":959,"stars":27,"repoUrl":28,"updatedAt":968},"encore-database","build Encore databases","Work with PostgreSQL in Encore.ts using `SQLDatabase` from `encore.dev\u002Fstorage\u002Fsqldb` — schema migrations and SQL queries.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[960,963,964,967],{"name":961,"slug":962,"type":16},"Database","database",{"name":9,"slug":8,"type":16},{"name":965,"slug":966,"type":16},"ORM","orm",{"name":21,"slug":22,"type":16},"2026-04-06T18:09:54.823017",{"slug":970,"name":970,"fn":971,"description":972,"org":973,"tags":974,"stars":27,"repoUrl":28,"updatedAt":985},"encore-frontend","connect frontend to Encore backend","Connect a frontend application (React, Next.js, Vue, Svelte, etc.) to an Encore.ts backend.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[975,976,979,982],{"name":9,"slug":8,"type":16},{"name":977,"slug":978,"type":16},"Frontend","frontend",{"name":980,"slug":981,"type":16},"Next.js","next-js",{"name":983,"slug":984,"type":16},"React","react","2026-04-06T18:09:56.091006",{"slug":987,"name":987,"fn":988,"description":989,"org":990,"tags":991,"stars":27,"repoUrl":28,"updatedAt":1002},"encore-getting-started","build and run applications with Encore.ts","Bootstrap a brand-new Encore.ts project from zero. Only for first-time CLI install and `encore app create` — not for architecture or feature questions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[992,993,994,995,998,999],{"name":885,"slug":886,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":996,"slug":997,"type":16},"Local Development","local-development",{"name":21,"slug":22,"type":16},{"name":1000,"slug":1001,"type":16},"Web Development","web-development","2026-04-06T18:10:04.885446",{"slug":1004,"name":1004,"fn":1005,"description":1006,"org":1007,"tags":1008,"stars":27,"repoUrl":28,"updatedAt":1014},"encore-go-api","build APIs with Encore Go","Define typed API endpoints in Encore Go using `\u002F\u002Fencore:api` annotations. Covers typed request\u002Fresponse structs, path\u002Fquery\u002Fheader\u002Fcookie params, and error returns. For raw endpoints (`\u002F\u002Fencore:api raw`) and inbound webhooks, use `encore-go-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1009,1010,1011],{"name":885,"slug":886,"type":16},{"name":9,"slug":8,"type":16},{"name":1012,"slug":1013,"type":16},"Go","go","2026-04-06T18:09:48.578781",{"slug":1016,"name":1016,"fn":1017,"description":1018,"org":1019,"tags":1020,"stars":27,"repoUrl":28,"updatedAt":1025},"encore-go-auth","implement authentication with Encore Go","Protect Encore Go endpoints with authentication and authorize callers. Covers `auth.AuthHandler`, `auth.UserID`, the `Authorization` header, and `\u002F\u002Fencore:api auth`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1021,1022,1023,1024],{"name":897,"slug":898,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1012,"slug":1013,"type":16},"2026-04-06T18:09:51.065102",{"slug":1027,"name":1027,"fn":1028,"description":1029,"org":1030,"tags":1031,"stars":27,"repoUrl":28,"updatedAt":1039},"encore-go-bucket","store files in Encore Go buckets","Store unstructured files in Encore Go using `objects.NewBucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1032,1033,1034,1035,1036],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":911,"slug":912,"type":16},{"name":1012,"slug":1013,"type":16},{"name":1037,"slug":1038,"type":16},"Storage","storage","2026-05-16T06:00:03.633918",28,{"items":1042,"total":1040},[1043,1049,1055,1063,1071,1077,1085],{"slug":879,"name":879,"fn":880,"description":881,"org":1044,"tags":1045,"stars":27,"repoUrl":28,"updatedAt":889},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1046,1047,1048],{"name":885,"slug":886,"type":16},{"name":9,"slug":8,"type":16},{"name":21,"slug":22,"type":16},{"slug":891,"name":891,"fn":892,"description":893,"org":1050,"tags":1051,"stars":27,"repoUrl":28,"updatedAt":901},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1052,1053,1054],{"name":897,"slug":898,"type":16},{"name":9,"slug":8,"type":16},{"name":21,"slug":22,"type":16},{"slug":903,"name":903,"fn":904,"description":905,"org":1056,"tags":1057,"stars":27,"repoUrl":28,"updatedAt":917},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1058,1059,1060,1061,1062],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":911,"slug":912,"type":16},{"name":914,"slug":915,"type":16},{"name":21,"slug":22,"type":16},{"slug":919,"name":919,"fn":920,"description":921,"org":1064,"tags":1065,"stars":27,"repoUrl":28,"updatedAt":933},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1066,1067,1068,1069,1070],{"name":14,"slug":15,"type":16},{"name":926,"slug":927,"type":16},{"name":9,"slug":8,"type":16},{"name":930,"slug":931,"type":16},{"name":21,"slug":22,"type":16},{"slug":935,"name":935,"fn":936,"description":937,"org":1072,"tags":1073,"stars":27,"repoUrl":28,"updatedAt":945},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1074,1075,1076],{"name":941,"slug":942,"type":16},{"name":9,"slug":8,"type":16},{"name":21,"slug":22,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":1078,"tags":1079,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1080,1081,1082,1083,1084],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":25,"slug":26,"type":16},{"name":21,"slug":22,"type":16},{"slug":955,"name":955,"fn":956,"description":957,"org":1086,"tags":1087,"stars":27,"repoUrl":28,"updatedAt":968},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1088,1089,1090,1091],{"name":961,"slug":962,"type":16},{"name":9,"slug":8,"type":16},{"name":965,"slug":966,"type":16},{"name":21,"slug":22,"type":16}]