{"id":37084964,"url":"https://github.com/sharik709/task-runner","last_synced_at":"2026-01-14T10:26:32.292Z","repository":{"id":285822815,"uuid":"959175278","full_name":"sharik709/task-runner","owner":"sharik709","description":"TaskOps (formerly Known as task-runner) is simplest way to let you run tasks at defined time and frequency. ","archived":false,"fork":false,"pushed_at":"2025-04-03T04:52:41.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T21:36:35.467Z","etag":null,"topics":["runner","scheduler","task","task-manager","task-runner","task-runners","task-scheduler"],"latest_commit_sha":null,"homepage":"","language":"Python","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/sharik709.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2025-04-02T11:42:57.000Z","updated_at":"2025-04-03T11:18:10.000Z","dependencies_parsed_at":"2025-04-02T21:34:56.251Z","dependency_job_id":"027c59f3-a448-4237-8927-2e831410d7c1","html_url":"https://github.com/sharik709/task-runner","commit_stats":null,"previous_names":["sharik709/task-runner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sharik709/task-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharik709%2Ftask-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharik709%2Ftask-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharik709%2Ftask-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharik709%2Ftask-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharik709","download_url":"https://codeload.github.com/sharik709/task-runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharik709%2Ftask-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"last_error":"SSL_read: 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":["runner","scheduler","task","task-manager","task-runner","task-runners","task-scheduler"],"created_at":"2026-01-14T10:26:31.815Z","updated_at":"2026-01-14T10:26:32.284Z","avatar_url":"https://github.com/sharik709.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TaskOps\n\nA flexible and extensible task processing system that allows you to schedule, execute, and monitor tasks with ease.\n\n## Features\n\n- **Flexible Task Scheduling**: Support for recurring and one-time tasks\n- **Extensible Plugin System**: Easy integration with various services and databases\n- **Robust Error Handling**: Built-in retry mechanisms and error logging\n- **YAML Configuration**: Simple task configuration using YAML files\n- **Comprehensive Logging**: Detailed logging with rotation and retention policies\n- **Type Safety**: Full type hints and validation using Pydantic\n\n## Installation\n\n### From GitHub (Recommended)\n```bash\npip install git+https://github.com/sharik709/task-runner.git\n```\n\n### From TestPyPI\n```bash\npip install -i https://test.pypi.org/simple/ taskops\n```\n\n### From PyPI\n```bash\npip install taskops\n```\n\nThis will install TaskOps along with its dependencies (pydantic, schedule, loguru, and pyyaml).\n\n## Quick Start\n\n1. Create a task configuration file (`tasks.yaml`):\n\n```yaml\ntasks:\n  - name: \"backup_database\"\n    command: \"pg_dump mydb \u003e backup.sql\"\n    schedule:\n      type: \"recurring\"\n      interval: \"1d\"\n    retry:\n      max_attempts: 3\n      delay: 300  # 5 minutes\n```\n\n2. Run the task processor:\n\n```bash\ntaskops --config-dir /path/to/config\n```\n\n## Configuration\n\n### Task Configuration\n\nTasks can be configured using YAML files. Each task can have the following properties:\n\n```yaml\nname: \"task_name\"          # Unique identifier for the task\ncommand: \"command_to_run\"  # Shell command to execute\nschedule:\n  type: \"recurring\"        # or \"one-time\"\n  interval: \"1h\"          # for recurring tasks (e.g., \"1m\", \"1h\", \"1d\")\n  start_time: \"2024-02-20T10:00:00\"  # for one-time tasks\nretry:\n  max_attempts: 3         # Maximum number of retry attempts\n  delay: 60              # Delay between retries in seconds\n```\n\n### Command Line Options\n\n```bash\ntaskops [OPTIONS]\n\nOptions:\n  --config-dir TEXT     Directory containing task configuration files\n  --log-dir TEXT       Directory for log files\n  --max-log-files INT  Maximum number of log files to keep per task\n  --help              Show this message and exit\n```\n\n### Python API Usage\n\nYou can also use TaskOps directly in your Python code:\n\n```python\nfrom datetime import datetime\nfrom task_processor import Task, Schedule, RetryConfig, TaskScheduler, LogManager, LogConfig\n\n# Initialize logging (optional but recommended)\nlog_config = LogConfig(log_dir=\"./logs\")\nlog_manager = LogManager(log_config)\n\n# Create a task scheduler with logging\nscheduler = TaskScheduler(log_manager=log_manager)\n\n# Define a recurring task\nrecurring_task = Task(\n    name=\"data_processing\",\n    command=\"python process_data.py\",\n    schedule=Schedule(\n        type=\"recurring\",\n        interval=\"1h\"  # Run every hour\n    ),\n    retry=RetryConfig(\n        max_attempts=3,\n        delay=60  # Retry after 60 seconds\n    )\n)\n\n# Define a one-time task\none_time_task = Task(\n    name=\"database_cleanup\",\n    command=\"python cleanup_db.py\",\n    schedule=Schedule(\n        type=\"one-time\",\n        start_time=datetime(2024, 5, 1, 3, 0, 0)  # Run at 3 AM on May 1, 2024\n    ),\n    retry=RetryConfig(\n        max_attempts=2,\n        delay=300  # Retry after 5 minutes\n    )\n)\n\n# Add tasks to the scheduler\nscheduler.add_task(recurring_task)\nscheduler.add_task(one_time_task)\n\n# Start the scheduler (this will block and run until stopped)\ntry:\n    print(\"Task scheduler is running. Press Ctrl+C to stop.\")\n    scheduler.run()\nexcept KeyboardInterrupt:\n    print(\"Shutting down scheduler...\")\n    scheduler.stop()\n```\n\nFor a complete working example, see [example_taskops.py](example_taskops.py).\n\n## Development\n\n### Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/sharik709/task-runner.git\ncd task-runner\n```\n\n2. Create and activate a virtual environment:\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n```\n\n3. Install development dependencies:\n```bash\npip install -r requirements.txt\n```\n\n### Running Tests\n\n```bash\npytest\n```\n\nFor coverage report:\n```bash\npytest --cov=task_processor --cov-report=term-missing\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharik709%2Ftask-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharik709%2Ftask-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharik709%2Ftask-runner/lists"}