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, createTaskModel
from quickScheduler.utils.triggers import TriggerType
task1 = createTaskModel(
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"
)
"""
A task could be a python callable
"""
def example_worker():
print("Hello World!")
task2 = createTaskModel(
name="Job to fail",
description="Print 'Hello World!' to the console",
schedule_type=TriggerType.IMMEDIATE,
callable_func = example_worker
)
from quickScheduler import QuickScheduler
scheduler = QuickScheduler(
config_file = PATH_TO_YAML_CONFIG_FILE # see examples/config.yml
tasks=[task1, task2]
)
scheduler.run()
Screenshots
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quick_scheduler-1.1.1.tar.gz.
File metadata
- Download URL: quick_scheduler-1.1.1.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
568294923050dbb4a63bf6670e3d9f39849471a93e734f646f15e959efe1a27d
|
|
| MD5 |
62c5013c0abd13e834de53ad3c5131ea
|
|
| BLAKE2b-256 |
c1309c4d3491c33114b0b14704f97b7757a30ef30e16b2ecae211bef449d7cf6
|
File details
Details for the file quick_scheduler-1.1.1-py3-none-any.whl.
File metadata
- Download URL: quick_scheduler-1.1.1-py3-none-any.whl
- Upload date:
- Size: 51.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbeb387d9ecd663a8541c013bf7b7e3a458979b222c37520057ba23bef8167ff
|
|
| MD5 |
275230301bb730ba5b530a2675395df0
|
|
| BLAKE2b-256 |
e095c6877a5c454fafc7de5158686e0ab4aa95438bcb3dfa4bebf20c7c8570c5
|