1.2.1 • Published 4 months ago

vercel-cron v1.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

vercel-cron

NPM Downloads Mutation testing badge GitHub commit activity (branch) GitHub Repo stars GitHub contributors GitHub issues by-label Minified Size License

GitHub Sponsors

Vercel Crons for local development

Getting Started

npm install --save-dev vercel-cron
npx vercel-cron
# See the other options!
npx vercel-cron --help

Crons will be loaded from your vercel.json and ping localhost:3000! Your config will be watched and reloaded on changes, so there's no need to restart.

process.env.CRON_SECRET will be used to secure your cron jobs. You don't need to provide this any differently than you would next dev: we're loading your environment variables the same way that next does.

Running alongside server

My favorite is concurrently, but there are many libraries that do this.

package.json

{
  "scripts": {
    "dev": "concurrently npm:dev:*",
    "dev:cron": "vercel-cron",
    "dev:next": "next dev"
  }
}

Differences from Vercel

Cron Expressions

Under the covers, we're using croner, which has slightly different cron expressions than vercel does. Until we can find an exact validation method, vercel's suggestion is to validate expressions against crontab guru.

1.2.0

4 months ago

1.1.6

4 months ago

1.2.1

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.1.5

4 months ago

1.1.4

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.0.0

4 months ago