Metadata-Version: 2.4
Name: dl2-tasks
Version: 0.1.0
Summary: A lightweight local task orchestration system built on windows task scheduler
Author-email: Datalys2 Team <kameron@example.com>
License: MIT License
        
        Copyright (c) 2026 Datalys2 Tasks Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/yourusername/datalys2-tasks
Project-URL: Documentation, https://github.com/yourusername/datalys2-tasks/blob/main/DOCUMENTATION.md
Project-URL: Repository, https://github.com/yourusername/datalys2-tasks.git
Keywords: windows,task scheduler,automation,scheduling,cron
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.20.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: sqlalchemy>=2.0.0
Dynamic: license-file

# Datalys2 Tasks

**A lightweight, local task orchestration system built for Windows.**

`dl2-tasks` (Datalys2 Tasks) is a robust wrapper around the native **Windows Task Scheduler**. It provides a modern Python interface for scheduling, managing, and monitoring background tasks without the need for a heavy, always-on server process.

## 🌟 Features

- **No Background Process Required:** Leverages Windows' built-in `schtasks.exe`.
- **Self-Scheduling Scripts:** Add `schedule_me()` to your script, run it once, and it's scheduled forever.
- **Lightweight:** Minimal dependencies.
- **Robust:** If Python crashes, the scheduler remains.

## 📦 Installation

```bash
pip install dl2-tasks
```

## 🚀 Quick Start

### Auto-Scheduling (The "Magic" Way)

The easiest way to use Datalys2 Tasks is to let your scripts schedule themselves.

1.  Create `my_task.py`:

    ```python
    import datetime
    from datalys2_tasks.scheduler.autorun import schedule_me
    
    def job():
        with open("log.txt", "a") as f:
            f.write(f"Ran at {datetime.datetime.now()}\n")
    
    if __name__ == "__main__":
        # Registers this script to run everyday at 08:00
        schedule_me("MyDailyLog", frequency="DAILY", at="08:00")
        
        job()
    ```

2.  Run it once manually:
    ```bash
    python my_task.py
    ```

3.  That's it! Windows will now run this script every day at 08:00.

### CLI Management

You can also manage tasks via the command line.

- **List tasks:** `datalys2-server schedule list`
- **Add a task:** `datalys2-server schedule add "Backup" "C:\scripts\backup.py" --schedule DAILY --time 02:00`
- **Run manually:** `datalys2-server schedule run "Backup"`

## 🖥️ Optional Dashboard

Includes a local dashboard for viewing task status.

```bash
datalys2-server start
```
*Opens http://localhost:8000/dashboard*

---

For full details, see the documentation.
