Vercel Cron Jobs logger for those who are in pain with the log span limit.
Installations
npm install vercel-cron-logger
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
18.19.1
NPM Version
10.2.4
Score
61.2
Supply Chain
74.4
Quality
74.9
Maintenance
50
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
devjiwonchoi
Download Statistics
Total Downloads
270
Last Day
1
Last Week
1
Last Month
25
Last Year
270
GitHub Statistics
1 Stars
5 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Mar 10, 2024
Bundle Size
136.58 kB
Minified
42.05 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.2
Package Id
vercel-cron-logger@0.0.2
Unpacked Size
3.59 kB
Size
1.67 kB
File Count
4
NPM Version
10.2.4
Node Version
18.19.1
Published on
Mar 06, 2024
Total Downloads
Cumulative downloads
Total Downloads
270
Last Day
0%
1
Compared to previous day
Last Week
0%
1
Compared to previous week
Last Month
525%
25
Compared to previous month
Last Year
0%
270
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
6
Vercel Cron Jobs Logger
Vercel Cron Jobs logger for those who are in pain with the log span limit.
Why this project?
For hobby plan users, Vercel has a log span limit of an hour. It is hard to debug your cron jobs after the span, only choice is to create a reprouction, which would consume much time and the result may vary due to numerous factors. This project is to help you to log your cron jobs to a database and view them later.
Setup
Create a Vercel Postgres Database
See Vercel Postgres for details.
Connect the database to your project with the cronjobs.
Create a Vercel Secret CRON_SECRET
See Securing cron jobs for details.
If you are not using this secret, it is highly recommended to use it.
Import vercel-cron-logger
to your cron job
1npm install vercel-cron-logger
1import VercelCronLogger from 'vercel-cron-logger'; 2 3export async function GET(request: Request) { 4 const authHeader = request.headers.get('authorization') 5 6 if (authHeader === `Bearer ${process.env.CRON_SECRET}`) { 7 // ...Your cron job logic 8 await VercelCronLogger(request) 9 return new Response('Success!', { status: 200 }) 10 } 11 12 return new Response('Unauthorized.', { status: 401 }) 13}
The logger returns a
Response
objects above with sameCRON_SECRET
validation logic internally.
Check your Vercel Postgres Database
You can check the logs in your project database.

No vulnerabilities found.

No security vulnerabilities found.