Skip to content

Commit

Permalink
feat: cron job
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrastopoulos committed May 27, 2024
1 parent bc8c8ae commit 2e947ae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/api/refresh/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { NextRequest, NextResponse } from 'next/server';

export default function GET(req: NextRequest) {
return NextResponse.next({
status: 200,
statusText: 'Hello, World!'
});
}
9 changes: 9 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"crons": [
{
"path": "/api/refresh",
"schedule": "0 6 * * *",
}
]
}

0 comments on commit 2e947ae

Please sign in to comment.