Skip to content

Commit

Permalink
fix: use deploy supported cron schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
Jabolol committed Dec 15, 2023
1 parent 3ecd205 commit 3ef3910
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,12 @@ export const config: RouteConfig = {
cocoa: "https://my-stats.dev/contribs",
vanilla: "https://my-stats.dev/issues",
},
schedule: {
minute: {
every: 20,
},
},
schedule: "*/20 * * * *",
};
```

5. This will make the endpoints `/cocoa` and `/vanilla` available and cache the
images every 20 minutes. You can add as many routes as you want!
images every `20` minutes. You can add as many routes as you want!

> [!NOTE]
> It is common practice to make your routes ingredients of your brownie!
Expand Down
8 changes: 2 additions & 6 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface RouteConfig {
/**
* Cron schedule configuration object.
*/
schedule: Deno.CronSchedule;
schedule: string | Deno.CronSchedule;
}

/**
Expand All @@ -19,9 +19,5 @@ export const config: RouteConfig = {
vanilla:
"https://github-readme-streak-stats-eight-iota.vercel.app/?user=Jabolol&theme=dracula&hide_border=false",
},
schedule: {
minute: {
every: 20,
},
},
schedule: "*/20 * * * *",
};

0 comments on commit 3ef3910

Please sign in to comment.