From 92fa6676716dbc26349f26490703240953f5d645 Mon Sep 17 00:00:00 2001 From: SwiichyCode Date: Wed, 13 Mar 2024 17:10:26 +0100 Subject: [PATCH] fix: remove execution function duration --- src/app/api/trigger/route.ts | 3 --- src/jobs/sync-repositories.ts | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/app/api/trigger/route.ts b/src/app/api/trigger/route.ts index 8365788..6331ed9 100644 --- a/src/app/api/trigger/route.ts +++ b/src/app/api/trigger/route.ts @@ -3,9 +3,6 @@ import { client } from "@/trigger"; import "@/jobs"; -// this is the maximum duration of the function in seconds. It must be less than 300 seconds (5 minutes). Full docs: https://vercel.com/docs/functions/serverless-functions/runtimes#max-duration -export const maxDuration = 300; - //this route is used to send and receive data with Trigger.dev export const { POST, dynamic } = createAppRoute(client); diff --git a/src/jobs/sync-repositories.ts b/src/jobs/sync-repositories.ts index ff5b4e3..3734704 100644 --- a/src/jobs/sync-repositories.ts +++ b/src/jobs/sync-repositories.ts @@ -7,12 +7,8 @@ client.defineJob({ name: "Sync Repositories Job", version: "0.0.1", - // trigger: cronTrigger({ - // cron: "30 02 * * *", - // }), - - trigger: intervalTrigger({ - seconds: 60, + trigger: cronTrigger({ + cron: "30 02 * * *", }), run: async (payload, io, ctx) => {