{"id":18657311,"url":"https://github.com/jmrozanec/cron-utils-sisyphus","last_synced_at":"2025-08-12T15:14:11.789Z","repository":{"id":150474399,"uuid":"60217964","full_name":"jmrozanec/cron-utils-sisyphus","owner":"jmrozanec","description":"Scala scheduler. As Sisyphus, will execute the task again and again, repeating the action for eternity.","archived":false,"fork":false,"pushed_at":"2022-08-01T16:19:24.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-18T00:40:01.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmrozanec.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-01T23:39:16.000Z","updated_at":"2022-08-01T16:19:27.000Z","dependencies_parsed_at":"2023-04-11T22:10:01.147Z","dependency_job_id":null,"html_url":"https://github.com/jmrozanec/cron-utils-sisyphus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmrozanec/cron-utils-sisyphus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrozanec%2Fcron-utils-sisyphus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrozanec%2Fcron-utils-sisyphus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrozanec%2Fcron-utils-sisyphus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrozanec%2Fcron-utils-sisyphus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmrozanec","download_url":"https://codeload.github.com/jmrozanec/cron-utils-sisyphus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrozanec%2Fcron-utils-sisyphus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270083001,"owners_count":24523845,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-07T07:27:38.102Z","updated_at":"2025-08-12T15:14:11.751Z","avatar_url":"https://github.com/jmrozanec.png","language":"Scala","readme":"Sisyphus\n===========\nA Scala scheduler that supports multiple cron notations. The project follows the [Semantic Versioning Convention](http://semver.org/) and uses Apache 2.0 license.\n\n## How to use it?\n\n    import com.cronutils.model.CronType\n    import com.cronutils.model.definition.CronDefinitionBuilder\n    import com.cronutils.parser.CronParser\n    import com.cronutils.sisyphus.model.{CronTask, Scheduler}\n    import org.joda.time.DateTime\n    \n    val scheduler = new Scheduler()\n    \n    //declare parsers and crons. We support parsing multiple cron formats!\n    val quartzparser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ))\n    val unixcronparser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.UNIX))\n    var qzcron = quartzparser.parse(\"*/5 * * * * ? *\")\n    var nixcron = unixcronparser.parse(\"* * * * *\")\n    \n    //define tasks to be executed!\n    val qzcrontask = new CronTask(\"qztimeprinter\") {\n      override def execute(): Unit = println(s\"We got a Quartz match! ${DateTime.now()}\")\n    }\n    val nixcrontask = new CronTask(\"nixtimeprinter\") {\n      override def execute(): Unit = println(s\"We got a Unix match! ${DateTime.now()}\")\n    }\n    \n    //schedule and enjoy!\n    scheduler.schedule(qzcron, qzcrontask)\n    scheduler.schedule(nixcron, nixcrontask)\n\nSisyphus leverages [cron-utils](https://github.com/jmrozanec/cron-utils) library to parse cron expressions and find if a date matches it. You can use any cron-expression to schedule a task.\n\n# Resources\n * [A list of papers published on this topic](http://stackoverflow.com/questions/6004978/what-is-a-calendar-queue)\n * [1977: An efficient data structure for the simulation event set](http://dl.acm.org/citation.cfm?id=359801)\n * [1979: A Simple and Robust Data Structure for the Simulation Event Set](http://technologists.com/sauer/RC8001.pdf)\n * [1988: Calendar Queues: A Fast O(1) Priority Queue Implementation for the Simulation Event Set Problem](http://pi4.informatik.uni-mannheim.de/pi4.data/content/courses/2004-ss/netsim/area51/Brown1988a.pdf)\n * [2000: Snoopy calendar queue](http://www.informs-sim.org/wsc00papers/068.PDF)\n * [Study of Optimised bucket widths in Calendar Queue for Discrete Event Simulator](http://pioneer.netserv.chula.ac.th/~achaodit/paper5.pdf)\n * [Ladder queue: An O(1) priority queue structure for large-scale discrete event simulation](http://dl.acm.org/citation.cfm?id=1103324)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrozanec%2Fcron-utils-sisyphus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmrozanec%2Fcron-utils-sisyphus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrozanec%2Fcron-utils-sisyphus/lists"}