{"id":23340412,"url":"https://github.com/imclint21/circle","last_synced_at":"2026-04-29T04:39:52.379Z","repository":{"id":83565685,"uuid":"253148452","full_name":"imclint21/circle","owner":"imclint21","description":".Net Core 3 Manager Background Service","archived":false,"fork":false,"pushed_at":"2020-04-05T18:20:37.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T19:57:46.322Z","etag":null,"topics":["background-jobs","background-worker","csharp","grpc","managed-services","netcore","netcore3","service","worker-service"],"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/imclint21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-05T03:33:13.000Z","updated_at":"2022-01-09T01:27:24.000Z","dependencies_parsed_at":"2023-07-07T19:16:08.056Z","dependency_job_id":null,"html_url":"https://github.com/imclint21/circle","commit_stats":null,"previous_names":["imclint21/circle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imclint21/circle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclint21%2Fcircle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclint21%2Fcircle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclint21%2Fcircle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclint21%2Fcircle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imclint21","download_url":"https://codeload.github.com/imclint21/circle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclint21%2Fcircle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32411539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T03:46:11.172Z","status":"ssl_error","status_checked_at":"2026-04-29T03:37:55.317Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-worker","csharp","grpc","managed-services","netcore","netcore3","service","worker-service"],"created_at":"2024-12-21T04:29:20.844Z","updated_at":"2026-04-29T04:39:52.363Z","avatar_url":"https://github.com/imclint21.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/5221349/78506525-4ffe4200-777a-11ea-9666-b73e2779aa23.png\" height=\"77\" alt=\"Circle\" /\u003e\n  \u003c/p\u003e\n  \u003ch3 align=\"center\"\u003e\n    About Circle\n  \u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    .Net Core 3 Manager Background Service.\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Introduction\n\nCircle is a .Net Core 3 Manager Background Service, that expose an API to handle it.\n\nYou simply need to add `AddCircle()` in the services collection.\n\n### Startup.cs\n\n```csharp\npublic void ConfigureServices(IServiceCollection services)\n{\n    services.AddCircle(options =\u003e\n    {\n        options.Period = TimeSpan.FromSeconds(5);\n        options.UseHandler\u003cWork\u003e();\n    });\n}\n```\n\n### Create a Job\n\nYou need to create a new class that inherits from `IWorkHandler`, and write the task that need to be executed.\n\n```csharp\npublic class Work : IWorkHandler\n{\n    public void DoWork()\n    {\n        Console.WriteLine(\"Test!\");\n    }\n}\n```\n  \n  ### Control the Job\n  \n  You can use `CircleControl` class to start, stop or restart the service.\n  \n  ```csharp\n public class HomeController : Controller\n{\n    private readonly CircleControl _circle;\n\n    public HomeController(CircleControl circle)\n    {\n        _circle = circle;\n    }\n\n    public IActionResult Stop()\n    {\n        _circle.Stop();\n        return Ok();\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimclint21%2Fcircle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimclint21%2Fcircle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimclint21%2Fcircle/lists"}