{"id":17236243,"url":"https://github.com/emmanueltouzery/crony","last_synced_at":"2025-04-14T02:08:41.134Z","repository":{"id":57727761,"uuid":"55732126","full_name":"emmanueltouzery/crony","owner":"emmanueltouzery","description":"A java library to work with cron specifications","archived":false,"fork":false,"pushed_at":"2017-05-15T12:30:01.000Z","size":75,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T02:08:35.490Z","etag":null,"topics":["cron","cron-definitions","cron-expression","cron-libraries","cron-specifications","crontab","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/emmanueltouzery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-07T22:23:41.000Z","updated_at":"2023-03-22T03:24:12.000Z","dependencies_parsed_at":"2022-08-30T09:20:41.693Z","dependency_job_id":null,"html_url":"https://github.com/emmanueltouzery/crony","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmanueltouzery%2Fcrony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmanueltouzery%2Fcrony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmanueltouzery%2Fcrony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmanueltouzery%2Fcrony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emmanueltouzery","download_url":"https://codeload.github.com/emmanueltouzery/crony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809044,"owners_count":21164896,"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":["cron","cron-definitions","cron-expression","cron-libraries","cron-specifications","crontab","java"],"created_at":"2024-10-15T05:35:43.039Z","updated_at":"2025-04-14T02:08:41.089Z","avatar_url":"https://github.com/emmanueltouzery.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crony\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.emmanueltouzery/crony/badge.png)](https://maven-badges.herokuapp.com/maven-central/com.github.emmanueltouzery/crony)\n[![Javadocs](https://www.javadoc.io/badge/com.github.emmanueltouzery/crony.svg)](https://www.javadoc.io/doc/com.github.emmanueltouzery/crony)\n\nCrony is a library to deal with cron scheduler specifictions in java. It can parse cron specifications, calculate dates of execution, and also programmatically create cron specifications and save them back to cron format strings.\n\n[Online Javadoc](http://emmanueltouzery.github.io/crony/apidocs/)\n\nCrony is available on maven-central:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.emmanueltouzery\u003c/groupId\u003e\n    \u003cartifactId\u003ecrony\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nCrony is licensed under the `MIT` license, and requires java8. It uses the java8 date time classes.\n\nCrony relies a lot on [vavr](http://vavr.io/), and results are most of the time returned using vavr lists, sets and the vavr `Validation` construct. Please refer to the Vavr documentation. Crony also tries to avoid exceptions and instead use optionals and Validation constructs.\nIf you prefer to use a more classical java exception-based control flow, you can simply call `get()` on the `Validation` objects you get back, and it will throw a runtime exception if something went wrong (that way though you won't get the error message, use `getError()` for that).\n\nBesides the standard `cron` format, crony supports also the nonstandard mechanism of putting `L` for the day of the month to specify the last day of the month.\n\n## Code snippets\n\n```java\nCron.parseCronString(\"0 8 * * 1\");\n```\n\n```java\nCronExecution.getNextExecutionDate(cron, date)\n```\n\n```java\nCron.build(\n        HashSet.empty(),\n        HashSet.of(1,2),\n        HashSet.of(1, DayOfMonthSpec.LAST_DAY_OF_MONTH),\n        HashSet.of(Month.JANUARY,Month.MARCH),\n        HashSet.of(DayOfWeek.MONDAY, DayOfWeek.SUNDAY))\n```\n\n```java\ncron.toCronString()\n```\n\n```java\ncron.isMatch(datetime)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmanueltouzery%2Fcrony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmanueltouzery%2Fcrony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmanueltouzery%2Fcrony/lists"}