Simple task automation framework for Python, integrating Rocketry for advanced scheduling and Apprise for multi-platform notifications. Wraps Python functions and shell commands into easily manageable and schedulable units.
MIT License
Simple task automation framework for Python, integrating Rocketry for advanced scheduling and Apprise for multi-platform notifications. Wraps Python functions and shell commands into easily manageable and schedulable units.
pip install tasker-python
pip install git+https://github.com/zigai/tasker.git
from tasker import Channel, CommandLineTask
task = CommandLineTask(
name="hello-world",
command="echo 'Hello World!'",
notification_channels=[
Channel("discord://...", events=["start", "success", "info", "fail"]),
],
stdout=True, # display stdout in notifications
)
task.exec() # run once
from tasker.scheduler import TaskScheduler, every
scheduler = TaskScheduler()
scheduler.schedule_task(task, every("10 seconds")) # run every 10 seconds
scheduler.run()