gitnik / cron-expression-verifier

tremendous.ooo/cron - cron expression verifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⏰ tremendous.ooo/cron - cron expression verifier

Ever wanted to check the validity of a cron expression or simply know when the next run is due, but all you had available was curl? With tremendous.ooo/cron, curl is actually all you need.

How to use

Simply make a POST request to tremendous.ooo/cron with the following payload:

{
    "cron": "0 0 * * WED"
}

and it will tell whether the expression is valid and when the next run would be:

{
    "nextRun": "2020-06-17T00:00:00.000Z",
    "status": 200
}

If you supply an invalid or no cron expression, here's what you'll get:

{
    "error": "Invalid cron expression.",
    "status": 400
}

Disclaimer: This project is not associated with crontab.guru

How to publish

This site is hosted on Cloudflare Workers. If you're looking to make changes and want to publish this yourself, use the following instructions:

  1. docker run -ti --entrypoint bash -v $PWD:/app node
  2. npm i @cloudflare/wrangler
  3. ./node_modules/.bin/wrangler publish

About

tremendous.ooo/cron - cron expression verifier


Languages

Language:HTML 57.4%Language:JavaScript 42.6%