Skip to content

Commit

Permalink
Add task scheduler to run full mutation weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
minkimcello committed Oct 19, 2022
1 parent 7da515d commit a669d47
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/backend/src/plugins/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export default async function createPlugin(
// before incremental builder migrations are executed
// await incrementalBuilder.build();

await env.scheduler.scheduleTask({
id: "test-task-scheduler",
frequency: { cron: '0 0 * * 7' },
timeout: { minutes: 10 },
fn: async () => await sourcegraphProvider.full(),
});

await processingEngine.start();

return router;
Expand Down

0 comments on commit a669d47

Please sign in to comment.