RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find CRON (part: date/time of execution)
Expression
^(((([\*]{1}){1})|((\*\/){0,1}(([0-9]{1}){1}|(([1-5]{1}){1}([0-9]{1}){1}){1}))) ((([\*]{1}){1})|((\*\/){0,1}(([0-9]{1}){1}|(([1]{1}){1}([0-9]{1}){1}){1}|([2]{1}){1}([0-3]{1}){1}))) ((([\*]{1}){1})|((\*\/){0,1}(([1-9]{1}){1}|(([1-2]{1}){1}([0-9]{1}){1}){1}|([3]{1}){1}([0-1]{1}){1}))) ((([\*]{1}){1})|((\*\/){0,1}(([1-9]{1}){1}|(([1-2]{1}){1}([0-9]{1}){1}){1}|([3]{1}){1}([0-1]{1}){1}))|(jan|feb|mar|apr|may|jun|jul|aug|sep|okt|nov|dec)) ((([\*]{1}){1})|((\*\/){0,1}(([0-7]{1}){1}))|(sun|mon|tue|wed|thu|fri|sat)))$
Description
SUPPORTED constructions: [*] - all five commands; [number] - minutes 0...59, hours 0...23, day in month 1...31, months 1...12, day in week 0...7 (0 & 7 is sun); [*/nubmer] - see construction [number]; [word] - only months (4th command) and days in week (5th command), warning this regexp is case sensitive (lower letters). NON SUPPORTED constructions: [number-number] and [number,number].
Matches
*/15 */12 30 feb 7 | 10 * * * */2 | * * * * *
Non-Matches
62 * * */2 * | * * * 0 * | * * * Feb *
Author Rating: The rating for this expression. Juraj Hajdúch (SK)
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Does not work
Name: Sheikh
Date: 11/29/2017 3:44:20 PM
Comment:
Does not work for "30 8,15 * * 1-5"


Title: Does not work
Name: Sheikh
Date: 11/29/2017 3:26:34 PM
Comment:
Does not work for "30 8,15 * * 1-5"


Title: Not accepting cron strings with commas
Name: eli
Date: 6/18/2016 8:30:32 PM
Comment:
not working for valid cron strings with comma such as 0,1,2 * * * * please help


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials