From 2e947aeecd27b66b956a88928ef1e4db750111a4 Mon Sep 17 00:00:00 2001 From: Gabriel Hall Date: Mon, 27 May 2024 12:56:19 -0700 Subject: [PATCH] feat: cron job --- src/app/api/refresh/route.ts | 8 ++++++++ vercel.json | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/app/api/refresh/route.ts create mode 100644 vercel.json diff --git a/src/app/api/refresh/route.ts b/src/app/api/refresh/route.ts new file mode 100644 index 0000000..fbcaaff --- /dev/null +++ b/src/app/api/refresh/route.ts @@ -0,0 +1,8 @@ +import { NextRequest, NextResponse } from 'next/server'; + +export default function GET(req: NextRequest) { + return NextResponse.next({ + status: 200, + statusText: 'Hello, World!' + }); +} diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..86d1ae0 --- /dev/null +++ b/vercel.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "crons": [ + { + "path": "/api/refresh", + "schedule": "0 6 * * *", + } + ] +} \ No newline at end of file