{"id":30741874,"url":"https://github.com/dcarea/fabron","last_synced_at":"2025-09-04T01:09:48.785Z","repository":{"id":38719357,"uuid":"304664852","full_name":"DCArea/Fabron","owner":"DCArea","description":"A distributed timer/job scheduler built on top of Project Orleans.","archived":false,"fork":false,"pushed_at":"2024-09-06T13:48:39.000Z","size":1024,"stargazers_count":20,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-01T01:26:47.465Z","etag":null,"topics":["background-jobs","background-tasks","cron-jobs","distributed-cron","distributed-timers","job-scheduler","orleans","scheduled-jobs"],"latest_commit_sha":null,"homepage":"","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/DCArea.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":"2020-10-16T15:20:32.000Z","updated_at":"2025-04-26T21:53:01.000Z","dependencies_parsed_at":"2023-11-30T11:25:20.350Z","dependency_job_id":"0dea20ea-7691-4dc9-b56e-f61ebc754f09","html_url":"https://github.com/DCArea/Fabron","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/DCArea/Fabron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCArea%2FFabron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCArea%2FFabron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCArea%2FFabron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCArea%2FFabron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCArea","download_url":"https://codeload.github.com/DCArea/Fabron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCArea%2FFabron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273534912,"owners_count":25122756,"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-09-03T02:00:09.631Z","response_time":76,"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":["background-jobs","background-tasks","cron-jobs","distributed-cron","distributed-timers","job-scheduler","orleans","scheduled-jobs"],"created_at":"2025-09-04T01:09:47.733Z","updated_at":"2025-09-04T01:09:48.763Z","avatar_url":"https://github.com/DCArea.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fabron\n\nThis is a distributed timer built on top of Project Orleans.\n\n### How to use it\n\nThere are 3 types of timers:\n* GenericTimer: fire once at the certain time.\n* PeriodicTimer: fire repeatly with a time span. \n* CronTimer: fire by following a cron schedule\n\n\n#### Define a fire router\n\n```csharp\npublic class AnnotationBasedFireRouter : IFireRouter\n{\n    private readonly IHttpDestinationHandler _http;\n\n    public AnnotationBasedFireRouter(IHttpDestinationHandler http) =\u003e _http = http;\n\n    public bool Matches(FireEnvelop envelop)\n    {\n        var extensions = envelop.Extensions;\n        return extensions.ContainsKey(\"routing.fabron.io/destination\");\n    }\n\n    public Task DispatchAsync(FireEnvelop envelop)\n    {\n        var destination = envelop.Extensions[\"routing.fabron.io/destination\"];\n        Guard.IsNotEmpty(destination, nameof(destination));\n        return destination.StartsWith(\"http\")\n            ? _http.SendAsync(new Uri(destination), envelop)\n            : ThrowHelper.ThrowArgumentOutOfRangeException\u003cTask\u003e(nameof(destination));\n    }\n}\n```\n\n#### Configure the server\n\n```csharp\n\nvar server = builder.Host.UseFabronServer()\n    .AddFireRouter\u003cDefaultFireRouter\u003e();\nvar client = builder.Host.UseFabronClient(cohosted: true);\n\nserver\n    .ConfigureOrleans((ctx, siloBuilder) =\u003e\n    {\n        // configure internal orleans server\n    })\n```\n\n#### Schedule a timer\n\n```csharp\nawait client.ScheduleCronTimer(\n    \"A_Timer_Key\",\n    new { SomeData = \"To be delivered at firing\" },\n    \"0 0 7 * * *\", // 7AM every day\n    extensions: new(){ { \"callback_url\": \"http://call_this_url_at_firing\" } });\n```\n\n### Design Details\nTBD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcarea%2Ffabron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcarea%2Ffabron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcarea%2Ffabron/lists"}