Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Dev Tools
#cron
#schedule
#task
#job

Cron Expression

Validates cron schedule expressions (5 fields: minute, hour, day of month, month, day of week) structurally.

Task scheduling validationCron job UI inputsSaaS automation rules
/
/
Risk
Test String
4 matches
(?:…){4}Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated exactly 4 times · {4} — exactly 4 times
(?:…)Non-capturing groupNon-capturing group — groups without capturing (no index assigned)
(?:…)?Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or one time (optional) · ? — zero or one time (optional)
(?:…)*Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or more times (greedy) · * — zero or more times (greedy)
\s+space\s — whitespace (space, tab, newline…) — repeated one or more times (greedy) · + — one or more times (greedy)
(?:…)Non-capturing groupNon-capturing group — groups without capturing (no index assigned)
\*\*\* — escaped character '*'
||| — alternation: matches expression on left OR right
\d+digit\d — digit (0–9) — repeated one or more times (greedy) · + — one or more times (greedy)
(?:…)?Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or one time (optional) · ? — zero or one time (optional)
(?:…)?Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or one time (optional) · ? — zero or one time (optional)
\/\/\/ — escaped character '/'
\d+digit\d — digit (0–9) — repeated one or more times (greedy) · + — one or more times (greedy)
(?:…)*Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or more times (greedy) · * — zero or more times (greedy)
,,',' — literal character
(?:…)Non-capturing groupNon-capturing group — groups without capturing (no index assigned)
(?:…)?Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or one time (optional) · ? — zero or one time (optional)
Pattern: 138 charsInput: 54 chars
100% client-side · private

Valid Examples

  • * * * * *
  • */5 10-12 * * *
  • 0,30 18-23 * * 1-5
  • 0 0 1 1 *

Invalid Examples

  • * * * * * * * *
  • invalid-cron-expr
  • * * * *
  • a * * * *

Usage & Integration

Validate Cron Expression natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('cron-expression', '...');

Python

from regexto_validators import validate

validate("cron-expression", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("cron-expression", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('cron-expression', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("cron-expression", "...").unwrap();