diff --git a/Cargo.lock b/Cargo.lock index 8400b73..847c51e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -781,6 +781,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cron" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8c3e73077b4b4a6ab1ea5047c37c57aee77657bc8ecd6f29b0af082d0b0c07" +dependencies = [ + "chrono", + "nom", + "once_cell", +] + [[package]] name = "cron_clock" version = "0.8.0" @@ -975,6 +986,15 @@ dependencies = [ "shared_child", ] +[[package]] +name = "duct_sh" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6633cadba557545fbbe0299a2f9adc4bb2fc5fb238773f5e841e0c23d62146" +dependencies = [ + "duct", +] + [[package]] name = "educe" version = "0.5.11" @@ -1021,6 +1041,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "english-to-cron" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c16423ac933fee80f05a52b435a912d5b08edbbbfe936e0042ebb3accdf303da" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "enum-ordinalize" version = "4.3.0" @@ -2040,9 +2070,9 @@ dependencies = [ [[package]] name = "loco-rs" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e9fc8050e474f53e840011f7f521b8ac497f8b3d84e3155265cf8292008921" +checksum = "92b58f8834452bee76b822ad42a9042c3d86367805d1cb4c8f3633c73bd4e73c" dependencies = [ "argon2", "async-trait", @@ -2058,6 +2088,8 @@ dependencies = [ "clap", "colored", "duct", + "duct_sh", + "english-to-cron", "fs-err", "futures-util", "hyper 1.4.1", @@ -2083,6 +2115,7 @@ dependencies = [ "tera", "thiserror", "tokio", + "tokio-cron-scheduler", "tower", "tower-http", "tracing", @@ -2296,6 +2329,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -4332,6 +4376,21 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tokio-cron-scheduler" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2594dd7c2abbbafbb1c78d167fd10860dc7bd75f814cb051a1e0d3e796b9702" +dependencies = [ + "chrono", + "cron", + "num-derive", + "num-traits", + "tokio", + "tracing", + "uuid", +] + [[package]] name = "tokio-macros" version = "2.4.0" diff --git a/Cargo.toml b/Cargo.toml index 3907b85..27d8016 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ http = "1.0.0" hyper = "1.0.1" # in-vite = "0.1.3" in-vite = { git = "https://github.com/mstallmo/in-vite", branch = "react" } -loco-rs = "0.8.1" +loco-rs = "0.9" maud = "0.25.0" serde = { version = "1", features = ["derive"] } serde_json = "1.0.107"