Skip to main content

A quick task scheduling library

Project description

Quick Scheduler

A Python-based task scheduler for running automated tasks efficiently. It provides a flexible and user-friendly way to schedule and manage tasks through both YAML configuration and programmatic API.

Features

  • Task scheduling with multiple trigger types (daily, interval)
  • YAML-based task configuration
  • Programmatic task creation through Python API
  • Web-based interface for task management
  • Real-time task monitoring and logging
  • System resource monitoring
  • Timezone support
  • Calendar-based scheduling

Installation

git clone https://github.com/YesDrX/QuickScheduler.git
cd QuickScheduler
pip install -r requirements.txt
pip install .

or

pip install quick-scheduler

Usage

Quick Scheduler can be configured using YAML files or programmatically through Python code. Here's a basic example:

./run.sh python ./examples/main.py

This will start the scheduler with example tasks defined in examples/tasks/ directory. The web interface will be available for task management.

You can define tasks in YAML format:

name: Service Health Check
description: Monitors critical services and endpoints
schedule_type: interval
schedule_config:
  start_time: 9:00
  end_time: 17:00
  interval: 60
  timezone: America/New_York
command: curl -f http://localhost:8000/health

Or create tasks programmatically:

from quickScheduler.backend.models import TaskModel, GlobalCallableFunctions
from quickScheduler.utils.triggers import TriggerType

task1 = TaskModel(
    name="Memory Monitor",
    description="Monitor system memory usage",
    schedule_type=TriggerType.DAILY,
    schedule_config={
        "run_time": "12:00",
        "timezone": "America/New_York"
    },
    command="free -h"
).calculate_hash_id()

"""
A task could be a python callable
"""
def example_worker():
    print("Hello World!")

task2 = TaskModel(
            name="Job to fail",
            description="Print 'Hello World!' to the console",
            schedule_type=TriggerType.IMMEDIATE,
            callable_func = GlobalCallableFunctions.register_function(example_worker)
        ).calculate_hash_id()


from quickScheduler import QuickScheduler
scheduler = QuickScheduler(
    config_file = PATH_TO_YAML_CONFIG_FILE # see examples/config.yml
    tasks=[task1, task2]
)
scheduler.run()

Screenshots

Main Page Tasks Page Task Details Page

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This project was built with the help of Trae AI Editor.

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

quick_scheduler-1.0.1.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

quick_scheduler-1.0.1-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file quick_scheduler-1.0.1.tar.gz.

File metadata

  • Download URL: quick_scheduler-1.0.1.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for quick_scheduler-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ce179290706d4799c7e2c1062307e1526c211e6813ae38108be9785a03e54918
MD5 6038f8aa152c825b48929cefa8227718
BLAKE2b-256 e7435734f1611beafcb833059dec04bb9e7158ca98dc1260a553ddd2e403a4f6

See more details on using hashes here.

File details

Details for the file quick_scheduler-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for quick_scheduler-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 064950b1d54f8c4ca0e13fd331075cd40f19af75fbf9432a56b79d2e08e6e475
MD5 69499a8e17aa06cd95d96f50b5a62a42
BLAKE2b-256 d2a1011b2b3d722d8c9e952b3cc842db28464f27ab7d2ea6885eb9a9d5967a6f

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