2024-07-21 15:25:13 +00:00
|
|
|
# Autotasker
|
2024-04-27 09:59:43 +00:00
|
|
|
|
2024-07-21 15:25:13 +00:00
|
|
|
Autotasker is a small server-side job runner and scheduler.
|
2024-04-27 09:59:43 +00:00
|
|
|
|
2024-07-21 15:25:13 +00:00
|
|
|
Autotasker free software licenced under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).
|
2024-04-27 09:59:43 +00:00
|
|
|
|
2024-07-21 15:25:13 +00:00
|
|
|
## Getting started
|
2024-04-27 09:59:43 +00:00
|
|
|
|
2024-07-21 15:25:13 +00:00
|
|
|
- Create a config file to define your tasks.
|
2024-08-02 14:39:21 +00:00
|
|
|
- Deploy the server with docker or using git clone + cargo install binary + systemd service.
|
2024-07-21 15:25:13 +00:00
|
|
|
- Enjoy!
|
2024-04-27 09:59:43 +00:00
|
|
|
|
2024-07-21 15:25:13 +00:00
|
|
|
## Philosophy
|
|
|
|
|
|
|
|
Unix-like
|
|
|
|
|
|
|
|
- Small.
|
|
|
|
- Can be configured with a file.
|
|
|
|
- Can be interfaced easily.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
- [x] List the tasks availables.
|
|
|
|
- [x] Run tasks in background.
|
|
|
|
- [x] Store the logs and tasks runs in a sqlite DB.
|
2024-07-23 21:23:44 +00:00
|
|
|
- [x] Schedule tasks (CRON-like).
|
2024-07-21 15:25:13 +00:00
|
|
|
- [ ] OpenMetrics exporter to alert when a task failed.
|
|
|
|
- [ ] External alerting when a task failed.
|
2024-07-24 14:03:44 +00:00
|
|
|
- [ ] Trigger task via webhook, with a webhook token and debouncing.
|
2024-07-21 15:25:13 +00:00
|
|
|
- [ ] Content negociation with JSON or HTML.
|
|
|
|
- [ ] OAuth2 support for admin.
|
|
|
|
|
|
|
|
## Vocabulary
|
|
|
|
|
|
|
|
- `Task` is a configured command to be run.
|
|
|
|
- `TaskRun` refer to a singular task run.
|
|
|
|
|
2024-08-02 14:39:21 +00:00
|
|
|
## Deploy & Usage
|
|
|
|
|
|
|
|
### Standard
|
|
|
|
|
|
|
|
You can use standard rust and cargo command to run the server.
|
|
|
|
You can start the daemon with `autotasker --config /path/to/config --database /path/to/database.db`.
|
|
|
|
|
|
|
|
### Docker
|
|
|
|
|
|
|
|
Build the alpine image:
|
|
|
|
|
|
|
|
just docker-build
|
|
|
|
|
|
|
|
Initialize the db:
|
|
|
|
|
|
|
|
just docker-init-db
|
|
|
|
|
|
|
|
Run with config and db volume:
|
|
|
|
|
|
|
|
just docker-run
|
|
|
|
|
|
|
|
## Getting started on development
|
|
|
|
|
|
|
|
This project use a `justfile`. [just](https://just.systems/man/en/) is a handy way to save and run project-specific commands.
|
|
|
|
|
2024-07-21 15:25:13 +00:00
|
|
|
## Built with
|
|
|
|
|
|
|
|
- [Axum](https://lib.rs/crates/axum) for web server.
|
|
|
|
- [Tera](https://lib.rs/crates/tera) for templating.
|
|
|
|
- [Sqlx](https://lib.rs/crates/sqlx) to interact with Sqlite.
|
|
|
|
- [Sqlite](https://sqlite.org/) for storing state and logs.
|
2024-08-02 14:39:21 +00:00
|
|
|
|