Skip to main content

A lightweight local task orchestration system built on windows task scheduler

Project description

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

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:

    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:

    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.

datalys2-server start

Opens http://localhost:8000/dashboard


For full details, see the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dl2_tasks-0.2.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dl2_tasks-0.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file dl2_tasks-0.2.0.tar.gz.

File metadata

  • Download URL: dl2_tasks-0.2.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dl2_tasks-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb8ce8ff9a3bf80102423c8adeb968982483062d37c109ff4612f5ad3ee38ce4
MD5 ec931a9905596576a9a3d6a671faa41b
BLAKE2b-256 66f1b78d700e0670e045d424501f0a6c67af5cb03b6448566bc8d217bdae827b

See more details on using hashes here.

File details

Details for the file dl2_tasks-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dl2_tasks-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dl2_tasks-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c675aaaea923662e13dff864d98a028d1c2bf034cb422711b8240d3ac093416
MD5 6f694f08e97bac0ea720772ba47761f7
BLAKE2b-256 afcb808064258eff3e1f90a01e0333891993859333112b06bc2904b543ae712e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page