Function/CLI tasks with scheduling and notifications
Project description
Tasker
Encapsulate function calls and shell commands as tasks with scheduling (powered by Rocketry) and notifications (powered by Apprise).
Installation
From PyPi
pip install tasker-python
From source
pip install git+https://github.com/zigai/tasker.git
Example
from tasker import Channel, CommandLineTask
discord_webhook = "discord://..."
task = CommandLineTask(
name="hello-world",
command="echo 'Hello World!'",
notification_channels=[
Channel(discord_webhook, 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
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
tasker-python-0.1.0.tar.gz
(7.5 kB
view details)
Built Distribution
File details
Details for the file tasker-python-0.1.0.tar.gz
.
File metadata
- Download URL: tasker-python-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f542e08f6b5a908dda67b192ea8b0f1bb30072063bc8fcd01cd07c2801f6120 |
|
MD5 | e981cd8724fd6f28900cdf6efb29e57c |
|
BLAKE2b-256 | 2f6ab1d7511b39dfc056c7f1871a7eeaa7cb2b76802be8c561b980261f095e9c |
File details
Details for the file tasker_python-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: tasker_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe2c92b5a053803fec988f80ee1e6a5343a0b005906e26571fbe107fe268aa53 |
|
MD5 | c4052fdef583de8138838a300ea08a0d |
|
BLAKE2b-256 | 4805dbf831db5cef63e14a6a9247fb90124e9a4836484c3f717ad095e1874932 |