{"id":30013766,"url":"https://github.com/fkucukkara/tickerqplayground","last_synced_at":"2026-05-20T14:06:51.956Z","repository":{"id":308002440,"uuid":"1031246799","full_name":"fkucukkara/tickerQPlayground","owner":"fkucukkara","description":"An educational introduction project demonstrating the capabilities of TickerQ, a fast, reflection-free background task scheduler for .NET.","archived":false,"fork":false,"pushed_at":"2025-08-03T14:11:56.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T16:06:59.424Z","etag":null,"topics":["background-jobs","csharp","dotnet-core","task-scheduler"],"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/fkucukkara.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,"zenodo":null}},"created_at":"2025-08-03T10:38:11.000Z","updated_at":"2025-08-03T14:11:59.000Z","dependencies_parsed_at":"2025-08-03T16:07:08.428Z","dependency_job_id":"733778e3-aa47-4835-a090-0198b4c80c34","html_url":"https://github.com/fkucukkara/tickerQPlayground","commit_stats":null,"previous_names":["fkucukkara/tickerqplayground"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fkucukkara/tickerQPlayground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FtickerQPlayground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FtickerQPlayground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FtickerQPlayground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FtickerQPlayground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fkucukkara","download_url":"https://codeload.github.com/fkucukkara/tickerQPlayground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FtickerQPlayground/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268936850,"owners_count":24331910,"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-05T02:00:12.334Z","response_time":2576,"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","csharp","dotnet-core","task-scheduler"],"created_at":"2025-08-05T17:00:54.732Z","updated_at":"2026-05-20T14:06:51.921Z","avatar_url":"https://github.com/fkucukkara.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TickerQ Playground\n\nAn educational introduction project demonstrating the capabilities of [TickerQ](https://github.com/Arcenox-co/TickerQ), a fast, reflection-free background task scheduler for .NET.\n\n## 🎯 About This Project\n\nThis playground project serves as a hands-on introduction to TickerQ, showcasing its core features including:\n\n- **Time-based and Cron scheduling** - Schedule jobs to run at specific times or using cron expressions\n- **Entity Framework Core integration** - Persistent job storage with SQL Server\n- **Live Dashboard UI** - Real-time monitoring and management of scheduled jobs\n- **Retry policies** - Automatic retry mechanisms for failed jobs\n- **Dependency injection support** - Seamless integration with .NET's DI container\n\n## 🚀 Features Demonstrated\n\n- ✅ Basic TickerQ setup and configuration\n- ✅ Simple job definition with `[TickerFunction]` attribute\n- ✅ Entity Framework Core operational store\n- ✅ Dashboard UI with basic authentication\n- ✅ SQL Server LocalDB integration\n- ✅ Automatic database migrations\n\n## 📋 Prerequisites\n\nBefore running this project, ensure you have:\n\n- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) or later\n- [SQL Server LocalDB](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb) (included with Visual Studio)\n- [Visual Studio 2022](https://visualstudio.microsoft.com/) or [Visual Studio Code](https://code.visualstudio.com/) (optional but recommended)\n\n## 🛠️ Installation \u0026 Setup\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/fkucukkara/tickerQPlayground.git\ncd TickerQPlayground\n```\n\n### 2. Restore Dependencies\n\n```bash\ndotnet restore\n```\n\n### 3. Database Setup\n\nThe project uses Entity Framework Core with SQL Server LocalDB. The database will be created automatically when you first run the application.\n\n**Connection String** (in `appsettings.json`):\n```json\n{\n  \"ConnectionStrings\": {\n    \"DefaultConnection\": \"Server=(localdb)\\\\mssqllocaldb;Database=TickerQ;Trusted_Connection=True;MultipleActiveResultSets=true\"\n  }\n}\n```\n\n### 4. Entity Framework Migrations (Optional)\n\nWhile the application automatically handles database creation and migrations, you can also manage them manually using Entity Framework Core CLI commands.\n\n#### Prerequisites for Manual Migrations\n\nEnsure you have the EF Core tools installed globally:\n\n```bash\ndotnet tool install --global dotnet-ef\n```\n\n#### Common Migration Commands\n\n**Add a new migration:**\n```bash\ndotnet ef migrations add \u003cMigrationName\u003e --project TickerQPlayground\n```\n\n**Update the database to the latest migration:**\n```bash\ndotnet ef database update --project TickerQPlayground\n```\n\n#### Example Migration Workflow\n\n1. **Create a new migration after model changes:**\n   ```bash\n   dotnet ef migrations add UpdateTickerSchema --project TickerQPlayground\n   ```\n\n2. **Apply the migration to the database:**\n   ```bash\n   dotnet ef database update --project TickerQPlayground\n   ```\n\n### 5. Run the Application\n\n```bash\ndotnet run --project TickerQPlayground\n```\n\nThe application will start on:\n- HTTP: `http://localhost:5264`\n- HTTPS: `https://localhost:7170`\n\n## 🎮 Usage\n\n### Accessing the Dashboard\n\nOnce the application is running, you can access the TickerQ Dashboard at:\n\n```\nhttp://localhost:5264/tickerq-dashboard\n```\n\n**Default Credentials:**\n- Username: `admin`\n- Password: `admin`\n\n### Sample Job\n\nThe project includes a simple cleanup job defined in [`Jobs.cs`](TickerQPlayground/Jobs.cs):\n\n```csharp\npublic class Jobs\n{\n    [TickerFunction(functionName: \"CleanerJob\")]\n    public void CleanupLogs()\n    {\n        Console.WriteLine(\"Cleaner...\");\n    }\n}\n```\n\nThis job can be scheduled through the dashboard or programmatically.\n\n### Testing the API\n\nUse the included HTTP file [`TickerQPlayground.http`](TickerQPlayground/TickerQPlayground.http) to test the basic endpoint:\n\n```http\nGET http://localhost:5264/hello/\nAccept: application/json\n```\n\n## ⚙️ Configuration\n\n### TickerQ Configuration\n\nThe main TickerQ configuration is in [`Program.cs`](TickerQPlayground/Program.cs):\n\n```csharp\nbuilder.Services.AddTickerQ(options =\u003e\n{\n    options.SetMaxConcurrency(4); // Optional: Set max concurrent jobs\n    options.AddOperationalStore\u003cMyDbContext\u003e(efOpt =\u003e\n    {\n        efOpt.UseModelCustomizerForMigrations();\n        efOpt.CancelMissedTickersOnApplicationRestart();\n    });\n    options.AddDashboard(basePath: \"/tickerq-dashboard\");\n    options.AddDashboardBasicAuth();\n});\n```\n\n### Key Configuration Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `SetMaxConcurrency(int)` | Maximum number of concurrent job executions | 4 |\n| `UseModelCustomizerForMigrations()` | Enables automatic EF migrations for TickerQ tables | - |\n| `CancelMissedTickersOnApplicationRestart()` | Cancels missed jobs on app restart | - |\n| `AddDashboard(basePath)` | Enables dashboard UI at specified path | `/tickerq-dashboard` |\n| `AddDashboardBasicAuth()` | Enables basic authentication for dashboard | - |\n\n### Database Configuration\n\nThe project uses a custom DbContext ([`MyDbContext.cs`](TickerQPlayground/MyDbContext.cs)) that integrates with TickerQ's operational store:\n\n```csharp\npublic class MyDbContext : DbContext\n{\n    public MyDbContext(DbContextOptions\u003cMyDbContext\u003e options)\n        : base(options) { }\n    \n    // TickerQ configurations are applied automatically\n    // when using UseModelCustomizerForMigrations()\n}\n```\n\n## 📊 Database Schema\n\nTickerQ creates the following tables in the `ticker` schema:\n\n- **TimeTickers** - Stores one-time scheduled jobs\n- **CronTickers** - Stores recurring cron-based jobs  \n- **CronTickerOccurrences** - Stores individual executions of cron jobs\n\n## 🔧 Project Structure\n\n```\nTickerQPlayground/\n├── Program.cs                 # Application entry point and TickerQ configuration\n├── Jobs.cs                    # Sample job definitions\n├── MyDbContext.cs            # Entity Framework DbContext\n├── appsettings.json          # Application configuration\n├── TickerQPlayground.http    # HTTP test requests\n├── Migrations/               # Entity Framework migrations\n│   ├── 20250803101422_InitialCreate.cs\n│   └── ...\n└── Properties/\n    └── launchSettings.json   # Launch profiles\n```\n\n## 🎯 Learning Objectives\n\nBy exploring this playground project, you'll learn:\n\n1. **Basic Setup** - How to integrate TickerQ into a .NET application\n2. **Job Definition** - How to create jobs using the `[TickerFunction]` attribute\n3. **Persistence** - How to configure Entity Framework Core for job storage\n4. **Monitoring** - How to use the dashboard for job management\n5. **Configuration** - Understanding various TickerQ configuration options\n\n## 🚀 Next Steps\n\nAfter exploring this playground, consider:\n\n1. **Adding More Jobs** - Create additional job classes with different scheduling patterns\n2. **Cron Scheduling** - Experiment with cron expressions for recurring jobs\n3. **Error Handling** - Implement custom exception handlers\n4. **Advanced Features** - Explore batch jobs, retry policies, and multi-node coordination\n5. **Production Setup** - Learn about production deployment considerations\n\n## 📚 Additional Resources\n\n- [TickerQ Official Repository](https://github.com/Arcenox-co/TickerQ)\n- [TickerQ Documentation](https://tickerq.arcenox.com)\n- [TickerQ NuGet Packages](https://www.nuget.org/packages/TickerQ/)\n\n### NuGet Packages Used\n\n- `TickerQ` (v2.4.1) - Core scheduling engine\n- `TickerQ.EntityFrameworkCore` (v2.4.1) - EF Core integration\n- `TickerQ.Dashboard` (v2.4.1) - Web dashboard UI\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**Database Connection Issues:**\n- Ensure SQL Server LocalDB is installed\n- Check if the connection string matches your LocalDB instance\n- Try running `sqllocaldb info` to verify LocalDB installation\n\n**Migration Issues:**\n- Delete the `Migrations` folder and run `dotnet ef migrations add InitialCreate --project TickerQPlayground`\n- Ensure the database is not in use by other applications\n- If you get \"No migrations configuration type was found\" error, make sure you're running commands from the solution root directory\n- For \"Unable to create an object of type 'MyDbContext'\" error, ensure the connection string is properly configured in `appsettings.json`\n- If migrations fail due to schema conflicts, try dropping the database first: `dotnet ef database drop --project TickerQPlayground`\n\n**Entity Framework CLI Issues:**\n- Install EF Core tools globally if commands are not recognized: `dotnet tool install --global dotnet-ef`\n- Update EF Core tools to the latest version: `dotnet tool update --global dotnet-ef`\n- Verify EF tools installation: `dotnet ef --version`\n- If you encounter permission issues, try running the command prompt as administrator\n\n**Dashboard Access Issues:**\n- Verify the application is running on the correct port\n- Check that basic auth credentials are correct (admin/admin)\n- Ensure the dashboard path is `/tickerq-dashboard`\n\n### Getting Help\n\nIf you encounter issues:\n\n1. Check the [TickerQ Issues](https://github.com/Arcenox-co/TickerQ/issues) page\n2. Review the [TickerQ Documentation](https://tickerq.arcenox.com)\n3. Examine the console output for error messages\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffkucukkara%2Ftickerqplayground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffkucukkara%2Ftickerqplayground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffkucukkara%2Ftickerqplayground/lists"}