{"id":13436760,"url":"https://github.com/bradymholt/cron-expression-descriptor","last_synced_at":"2025-04-23T20:52:14.531Z","repository":{"id":2483607,"uuid":"3457099","full_name":"bradymholt/cron-expression-descriptor","owner":"bradymholt","description":"A .NET library that converts cron expressions into human readable descriptions.","archived":false,"fork":false,"pushed_at":"2025-04-17T12:56:43.000Z","size":98792,"stargazers_count":1051,"open_issues_count":2,"forks_count":192,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-19T08:50:20.561Z","etag":null,"topics":["c-sharp","cron","cron-expression","cron-libraries","human-readable-descriptions","nuget","quartz"],"latest_commit_sha":null,"homepage":"https://bradymholt.github.io/cron-expression-descriptor/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradymholt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["bradymholt"]}},"created_at":"2012-02-16T04:55:33.000Z","updated_at":"2025-04-17T12:56:47.000Z","dependencies_parsed_at":"2023-07-08T08:01:39.079Z","dependency_job_id":"26d154c4-4a65-4e77-9ebf-f9ae3fe1078f","html_url":"https://github.com/bradymholt/cron-expression-descriptor","commit_stats":{"total_commits":697,"total_committers":54,"mean_commits":"12.907407407407407","dds":"0.29985652797704443","last_synced_commit":"eef5a3ed26950ed046f2d34547e6679fa9ab3484"},"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradymholt%2Fcron-expression-descriptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradymholt%2Fcron-expression-descriptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradymholt%2Fcron-expression-descriptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradymholt%2Fcron-expression-descriptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradymholt","download_url":"https://codeload.github.com/bradymholt/cron-expression-descriptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716739,"owners_count":21315068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","cron","cron-expression","cron-libraries","human-readable-descriptions","nuget","quartz"],"created_at":"2024-07-31T03:00:51.913Z","updated_at":"2025-04-23T20:52:14.488Z","avatar_url":"https://github.com/bradymholt.png","language":"C#","funding_links":["https://github.com/sponsors/bradymholt"],"categories":["HarmonyOS","C\\#","others","Libraries","C#"],"sub_categories":["Windows Manager"],"readme":"# Cron Expression Descriptor [![Build](https://github.com/bradymholt/cron-expression-descriptor/actions/workflows/build.yml/badge.svg)](https://github.com/bradymholt/cron-expression-descriptor/actions/workflows/build.yml) [![NuGet version](https://badge.fury.io/nu/CronExpressionDescriptor.svg)](https://badge.fury.io/nu/CronExpressionDescriptor)\n\n\n\u003cimg align=\"left\" src=\"https://user-images.githubusercontent.com/759811/210273710-b13913e2-0a71-4d9d-94da-1fe538b8a73e.gif\"/\u003e\n\n\u003cbr/\u003e\n\n \u0026nbsp;**Would you take a quick second and ⭐️ my repo?**\n\n\u003cbr/\u003e\n\nA .NET library that converts cron expressions into human readable descriptions.\n\n```\nCronExpressionDescriptor.ExpressionDescriptor.GetDescription(\"* * * * *\");\n\u003e \"Every minute\"\n```\n\n**Author**: Brady Holt (http://www.geekytidbits.com)\n**License**: [MIT](https://github.com/bradymholt/cron-expression-descriptor/blob/dotnet-core/LICENSE)\n\n## Features\n\n * Supports all cron expression special characters including * / , - ? L W, #\n * Supports 5, 6 (w/ seconds or year), or 7 (w/ seconds and year) part cron expressions\n * Localization with support for 29 languages\n * Provides casing options (Sentence case, Title Case, lowercase, etc.)\n * Supports [Quartz Enterprise Scheduler .NET](https://www.quartz-scheduler.net/) cron expressions\n\n## Demo\n\n[https://bradymholt.github.io/cron-expression-descriptor](https://bradymholt.github.io/cron-expression-descriptor/)\n\n## Download\n\nCron Expression Descriptor releases can be installed with **NuGet**.\n\n### Package Manager (Visual Studio)\n\n    Install-Package CronExpressionDescriptor\n\n### .NET CLI\n\n    dotnet add package CronExpressionDescriptor\n\n[Visit the NuGet Package page](https://www.nuget.org/packages/CronExpressionDescriptor/) for more info.\n\nView [Releases](https://github.com/bradymholt/cron-expression-descriptor/releases) for release version history.\n\n## Quick Start\n\n```csharp\nCronExpressionDescriptor.ExpressionDescriptor.GetDescription(\"* * * * *\");\n\u003e \"Every minute\"\n```\n\n## Options\n\nA `CronExpressionDescriptor.Options` object can be passed to `GetDescription`.  The following options are available:\n\n- **bool ThrowExceptionOnParseError** - If exception occurs when trying to parse expression and generate description, whether to throw or catch and output the Exception message as the description. (Default: true)\n- **bool Verbose** - Whether to use a verbose description (Default: false)\n- **bool DayOfWeekStartIndexZero** - Whether to interpret cron expression DOW `1` as Sunday or Monday. (Default: true)\n- **?bool Use24HourTimeFormat** - If true, descriptions will use a [24-hour clock](https://en.wikipedia.org/wiki/24-hour_clock) (Default: false but some translations will default to true)\n- **string Locale** - The locale to use (Default: \"en\")\n\nExample usage:\n\n```csharp\nExpressionDescriptor.GetDescription(\"0-10 11 * * *\", new Options(){\n    DayOfWeekStartIndexZero = false,\n    Use24HourTimeFormat = true,\n    Locale = \"fr\"\n});\n```\n\n## i18n\n\nThe following language translations are available.\n\n * English - en ([Brady Holt](https://github.com/bradymholt))\n * Chinese Simplified - zh-Hans (zh-CN) ([Star Peng](https://github.com/starpeng))\n * Chinese Traditional - zh-Hant (zh-TW) ([Ricky Chiang](https://github.com/metavige))\n * Czech - cz ([Jirka](https://github.com/Betacart))\n * Danish - da ([Rasmus Melchior Jacobsen](https://github.com/rmja))\n * Dutch - nl ([TotalMace](https://github.com/TotalMace))\n * Finnish - fi ([Mikael Rosenberg](https://github.com/MR77FI))\n * French - fr ([Arnaud TAMAILLON](https://github.com/Greybird))\n * German - de ([Michael Schuler](https://github.com/mschuler))\n * Hebrew - he ([Ariel Deil](https://github.com/arieldeil))\n * Hungarian - hu ([Varga Miklós](https://github.com/Micky2149))\n * Italian - it ([rinaldihno](https://github.com/rinaldihno))\n * Japanese - ja ([Alin Sarivan](https://github.com/asarivan))\n * Korean - ko ([Ion Mincu](https://github.com/ionmincu))\n * Norwegian - nb ([Siarhei Khalipski](https://github.com/KhalipskiSiarhei))\n * Persian (Farsi) - fa ([A. Bahrami](https://github.com/alirezakoo))\n * Polish - pl ([foka](https://github.com/foka))\n * Portuguese (Brazil) - pt-BR ([Renato Lima](https://github.com/natenho))\n * Romanian - ro ([Illegitimis](https://github.com/illegitimis))\n * Russian - ru ([LbISS](https://github.com/LbISS))\n * Slovenian - sl-SI ([Jani Bevk](https://github.com/jenzy))\n * Spanish - es ([Ivan Santos](https://github.com/ivansg))\n * Spanish (Mexico) - es-MX ([Ion Mincu](https://github.com/ionmincu))\n * Swedish - sv ([roobin](https://github.com/roobin))\n * Vietnamese - vi ([Nguyen Duc Son](https://github.com/ali33))\n * Turkish - tr ([Mustafa SADEDİL](https://github.com/sadedil))\n * Ukrainian - uk ([Taras](https://github.com/tbudurovych))\n * Greek - el ([hardra1n](https://github.com/Hardra1n))\n * Kazakh - kk ([hardra1n](https://github.com/Hardra1n))\n\nTo use one of these translations, pass in the `Locale` option to `GetDescription`.  For example, to get the description of `0-10 11 * * *` in German:\n\n```csharp\nExpressionDescriptor.GetDescription(\"0-10 11 * * *\", new Options(){ Locale = \"de\" });\n\u003e \"Jede Minute zwischen 11:00 und 11:10\"\n```\n\nAlternatively, you can call `ExpressionDescriptor.SetDefaultLocale(\"es\");` first to set the default locale and then every usage will use this locale by default.\n\n```csharp\nExpressionDescriptor.SetDefaultLocale(\"es\");\n\nExpressionDescriptor.GetDescription(\"*/45 * * * * *\");\n\u003e \"Cada 45 segundos\"\n\nExpressionDescriptor.GetDescription(\"0-10 11 * * *\");\n\u003e \"Cada minuto entre las 11:00 AM y las 11:10 AM\"\n```\n\n### CurrentUICulture\n\nIf you are targeting a platform that [supports .NET Standard \u003e= 2.0](https://github.com/dotnet/standard/blob/master/docs/versions.md), [Thread.CurrentUICulture](https://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture(v=vs.110).aspx) is supported for determining the default locale, without explicitly passing it in with the `Locale` option, so the following will work:\n\n```csharp\n// .NET Standard \u003e= 2.0 only\nCultureInfo myCultureInfo = new CultureInfo(\"it-IT\");\nThread.CurrentThread.CurrentUICulture = myCultureInfo;\nExpressionDescriptor.GetDescription(\"* * * * *\");\n\u003e \"Ogni minuto\"\n```\n\n## .NET Platform Support\n\nBeginning with version 2.0.0, the NuGet package will contain a library targeting .NET Standard 1.1 and 2.0.  This allows the library to be consumed by applications running on the following .NET platforms:\n\n- .NET Core \u003e= 1.0\n- .NET Framework \u003e= 4.5\n- Mono \u003e= 4.6\n- ([More](https://github.com/dotnet/standard/blob/master/docs/versions.md))\n\nIf your application is targeting an earlier version of .NET Framework (i.e. 4.0 or 3.5), you can use version `1.21.2` as it has support back to .NET Framework 3.5.  To install this version, run `Install-Package CronExpressionDescriptor -Version 1.21.2`.\n\n### Strong Name Signing\n\nIf you need an assembly that is [signed with a strong name](https://msdn.microsoft.com/en-us/library/wd40t7ad(v=vs.100).aspx), you can use version 1.21.2 as it is currently the latest version signed with a strong name.\n\n## Ports\n\nThis library has been ported to several other languages.\n\n - JavaScript - [https://github.com/bradymholt/cRonstrue](https://github.com/bradymholt/cRonstrue)\n - Java - [https://github.com/RedHogs/cron-parser](https://github.com/RedHogs/cron-parser)\n - Java - [https://github.com/voidburn/cron-expression-descriptor](https://github.com/voidburn/cron-expression-descriptor)\n - Ruby - [https://github.com/alpinweis/cronex](https://github.com/alpinweis/cronex)\n - Python - [https://github.com/Salamek/cron-descriptor](https://github.com/Salamek/cron-descriptor)\n - PHP - [https://github.com/panlatent/cron-expression-descriptor](https://github.com/panlatent/cron-expression-descriptor)\n - Go - [https://github.com/lnquy/cron](https://github.com/lnquy/cron)\n - Rust - [https://github.com/cflockhart/cron-descriptor-rust](https://github.com/cflockhart/cron-descriptor-rust)\n\n## Frequently Asked Questions\n\n\u003e The cron expression I am passing in is not valid and this library is giving strange output.  What should I do?\n\nThis library does not do full validation of cron expressions and assumes the expression passed in is valid. If you need to validate an expression consider using a library like [Cronos](https://github.com/HangfireIO/Cronos).\n\n\u003e Does this library support showing the \"next\" scheduled date?\n\nNo, this is not supported.\n\n## Examples\n\nExpressionDescriptor.GetDescription(\"* * * * *\");\n\u003e \"Every minute\"\n\nExpressionDescriptor.GetDescription(\"*/1 * * * *\");\n\u003e \"Every minute\"\n\nExpressionDescriptor.GetDescription(\"0 0/1 * * * ?\");\n\u003e \"Every minute\"\n\nExpressionDescriptor.GetDescription(\"0 0 * * * ?\");\n\u003e \"Every hour\"\n\nExpressionDescriptor.GetDescription(\"0 0 0/1 * * ?\");\n\u003e \"Every hour\"\n\nExpressionDescriptor.GetDescription(\"0 23 ? * MON-FRI\");\n\u003e \"At 11:00 PM, Monday through Friday\"\n\nExpressionDescriptor.GetDescription(\"* * * * * *\");\n\u003e \"Every second\"\n\nExpressionDescriptor.GetDescription(\"*/45 * * * * *\");\n\u003e \"Every 45 seconds\"\n\nExpressionDescriptor.GetDescription(\"*/5 * * * *\");\n\u003e \"Every 5 minutes\"\n\nExpressionDescriptor.GetDescription(\"0 0/10 * * * ?\");\n\u003e \"Every 10 minutes\"\n\nExpressionDescriptor.GetDescription(\"0 */5 * * * *\");\n\u003e \"Every 5 minutes\"\n\nExpressionDescriptor.GetDescription(\"30 11 * * 1-5\");\n\u003e \"At 11:30 AM, Monday through Friday\"\n\nExpressionDescriptor.GetDescription(\"30 11 * * *\");\n\u003e \"At 11:30 AM\"\n\nExpressionDescriptor.GetDescription(\"0-10 11 * * *\");\n\u003e \"Every minute between 11:00 AM and 11:10 AM\"\n\nExpressionDescriptor.GetDescription(\"* * * 3 *\");\n\u003e \"Every minute, only in March\"\n\nExpressionDescriptor.GetDescription(\"* * * 3,6 *\");\n\u003e \"Every minute, only in March and June\"\n\nExpressionDescriptor.GetDescription(\"30 14,16 * * *\");\n\u003e \"At 02:30 PM and 04:30 PM\"\n\nExpressionDescriptor.GetDescription(\"30 6,14,16 * * *\");\n\u003e \"At 06:30 AM, 02:30 PM and 04:30 PM\"\n\nExpressionDescriptor.GetDescription(\"46 9 * * 1\");\n\u003e \"At 09:46 AM, only on Monday\"\n\nExpressionDescriptor.GetDescription(\"23 12 15 * *\");\n\u003e \"At 12:23 PM, on day 15 of the month\"\n\nExpressionDescriptor.GetDescription(\"23 12 * JAN *\");\n\u003e \"At 12:23 PM, only in January\"\n\nExpressionDescriptor.GetDescription(\"23 12 ? JAN *\");\n\u003e \"At 12:23 PM, only in January\"\n\nExpressionDescriptor.GetDescription(\"23 12 * JAN-FEB *\");\n\u003e \"At 12:23 PM, January through February\"\n\nExpressionDescriptor.GetDescription(\"23 12 * JAN-MAR *\");\n\u003e \"At 12:23 PM, January through March\"\n\nExpressionDescriptor.GetDescription(\"23 12 * * SUN\");\n\u003e \"At 12:23 PM, only on Sunday\"\n\nExpressionDescriptor.GetDescription(\"*/5 15 * * MON-FRI\");\n\u003e \"Every 5 minutes, between 03:00 PM and 03:59 PM, Monday through Friday\"\n\nExpressionDescriptor.GetDescription(\"* * * * MON#3\");\n\u003e \"Every minute, on the third Monday of the month\"\n\nExpressionDescriptor.GetDescription(\"* * * * 4L\");\n\u003e \"Every minute, on the last Thursday of the month\"\n\nExpressionDescriptor.GetDescription(\"*/5 * L JAN *\");\n\u003e \"Every 5 minutes, on the last day of the month, only in January\"\n\nExpressionDescriptor.GetDescription(\"30 02 14 * * *\");\n\u003e \"At 02:02:30 PM\"\n\nExpressionDescriptor.GetDescription(\"5-10 * * * * *\");\n\u003e \"Seconds 5 through 10 past the minute\"\n\nExpressionDescriptor.GetDescription(\"5-10 30-35 10-12 * * *\");\n\u003e \"Seconds 5 through 10 past the minute, minutes 30 through 35 past the hour, between 10:00 AM and 12:00 PM\"\n\nExpressionDescriptor.GetDescription(\"30 */5 * * * *\");\n\u003e \"At 30 seconds past the minute, every 05 minutes\"\n\nExpressionDescriptor.GetDescription(\"0 30 10-13 ? * WED,FRI\");\n\u003e \"At 30 minutes past the hour, between 10:00 AM and 01:00 PM, only on Wednesday and Friday\"\n\nExpressionDescriptor.GetDescription(\"10 0/5 * * * ?\");\n\u003e \"At 10 seconds past the minute, every 05 minutes\"\n\nExpressionDescriptor.GetDescription(\"2-59/3 1,9,22 11-26 1-6 ?\");\n\u003e \"Every 03 minutes, minutes 2 through 59 past the hour, at 01:00 AM, 09:00 AM, and 10:00 PM, between day 11 and 26 of the month, January through June\"\n\nExpressionDescriptor.GetDescription(\"0 0 6 1/1 * ?\");\n\u003e \"At 06:00 AM\"\n\nExpressionDescriptor.GetDescription(\"0 5 0/1 * * ?\");\n\u003e \"At 05 minutes past the hour\"\n\nExpressionDescriptor.GetDescription(\"* * * * * * 2013\");\n\u003e \"Every second, only in 2013\"\n\nExpressionDescriptor.GetDescription(\"* * * * * 2013\");\n\u003e \"Every minute, only in 2013\"\n\nExpressionDescriptor.GetDescription(\"* * * * * 2013,2014\");\n\u003e \"Every minute, only in 2013 and 2014\"\n\nExpressionDescriptor.GetDescription(\"23 12 * JAN-FEB * 2013-2014\");\n\u003e \"At 12:23 PM, January through February, 2013 through 2014\"\n\nExpressionDescriptor.GetDescription(\"23 12 * JAN-MAR * 2013-2015\");\n\u003e \"At 12:23 PM, January through March, 2013 through 2015\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradymholt%2Fcron-expression-descriptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradymholt%2Fcron-expression-descriptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradymholt%2Fcron-expression-descriptor/lists"}