horoscope 0.0.1

The all knowing scheduler
Documentation

This crate provides a general purpose scheduler. The horoscope scheduler provides functionality out the box and is easily extensible.

Features

  • Fast: horoscope runs magnitudes faster than schedulers built in other languages that are mainstream. stream, horoscope runs magnitudes faster
  • Concurrent: executors run jobs in their own tasks in order to get as much work done as fast as possible.
  • Intuitive: You get a lot of powerful functionality out of the box to run CRON, Network tasks, retrieve jobs from memory, pg, and redis. If they are not what you are looking for, Implement your own Job, Trigger, Store, or Executor.
  • Easy to learn: Detailed documentation

Examples

use horoscope::executor::Executor;
use horoscope::job::network::{Job, NetType};
use horoscope::scheduler::{Schedule, blocking, daemon, Msg};
use horoscope::store::memory::Store;

fn main() {
    let store = Store::new(String::from("jobStore-test"));
    let exec = Executor::new(String::from("executor-test"));
    let njob = Job::new(
        String::from("job-1"),
        String::from("https://ping.me/"),
        NetType::Get,
        None,
    );

    let mut blk_scheduler = blocking::Scheduler::new();
    blk_scheduler
        .add_store(String::from("jobStore-test"), Box::new(store))
        .unwrap();
    blk_scheduler
        .add_executor(String::from("executor-test"), exec)
        .unwrap();

    let scheduler = daemon(blk_scheduler);

    scheduler
        .send(Msg::AddJob(
            String::from("job-1"),
            String::from("jobStore-test"),
            String::from("executor-test"),
            start_time,
            None,
            Box::new(njob),
        ))
        .await;
}

More examples, including networking and file access, can be found in our examples directory and in our documentation.

Philosophy

We believe it's helpful to have general implementations of common use-cases, but will always allow you to take over and implement to your liking.

Installation

With cargo add installed run:

$ cargo add horoscope

License