Crate tasker_lib

source ·
Expand description

the library exports two modules the first is taskerctl for configuring tasks and reading logs/tasks, table. ##taskerctl #usage example:

use tasker::taskerctl::{read_tasks_db,read_logs_db,rm_task,Task,add_task};
    let task_db: Vec<Task> = read_tasks_db(); //read tasks database
    let logs = read_logs_db();                //read logs database
    let mut new_task = Task::new();           //get new Task struct
    new_task.name = Some(String::from("new_task")) //set name , and the rest of the values
    ...
    add_task(new_task);                        //add the new task to the tasks database

tasker_service: the second module is used for starting the tasker_service daemon which runs in the background, and execute tasks, based on our taskerctl configurations. usage example:

use tasker::tasker_service;
fn main() {
   tasker_service::main_service(); //starting the service
 }

Modules