diff --git a/apps/web/app/api/cron/credentials/route.ts b/apps/web/app/api/cron/credentials/route.ts index e9eb87502e..4879efed8c 100644 --- a/apps/web/app/api/cron/credentials/route.ts +++ b/apps/web/app/api/cron/credentials/route.ts @@ -1,3 +1,8 @@ +/** + * @description This route is used to create and delete Credential records for all members of an organization that has delegation credentials enabled. + * + * It also deletes Credential records for all members of an organization that has delegation credentials disabled. + */ import type { NextRequest } from "next/server"; import { NextResponse } from "next/server"; diff --git a/apps/web/app/api/cron/selected-calendars/route.ts b/apps/web/app/api/cron/selected-calendars/route.ts index 897c3483a7..a94fe0a27d 100644 --- a/apps/web/app/api/cron/selected-calendars/route.ts +++ b/apps/web/app/api/cron/selected-calendars/route.ts @@ -1,3 +1,8 @@ +/** + * @description This route is used to create SelectedCalendar records based on Credential records corresponding to Delegation Credentials + * + * It works in conjunction with `/api/cron/credentials` route(which creates the Credential records for all the members of an organization that has delegation credentials enabled) + */ import type { NextRequest } from "next/server"; import { NextResponse } from "next/server"; diff --git a/apps/web/vercel.json b/apps/web/vercel.json index dc6e6899d0..3e648c6b08 100644 --- a/apps/web/vercel.json +++ b/apps/web/vercel.json @@ -15,6 +15,14 @@ { "path": "/api/tasks/cleanup", "schedule": "0 0 * * *" + }, + { + "path": "/api/cron/credentials", + "schedule": "*/5 * * * *" + }, + { + "path": "/api/cron/selected-calendars", + "schedule": "*/5 * * * *" } ], "functions": {