tasker

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

Downloads
96
Stars
0
Committers
2

Tasker

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.

Installation

From PyPi

pip install tasker-python

From source

pip install git+https://github.com/zigai/tasker.git

Example

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()

License

MIT License