{"id":16795120,"url":"https://github.com/mehcode/schedule-rs","last_synced_at":"2025-04-03T03:11:46.160Z","repository":{"id":57666333,"uuid":"80670811","full_name":"mehcode/schedule-rs","owner":"mehcode","description":"An in-process scheduler for periodic jobs. Schedule lets you run Rust functions on a cron-like schedule.","archived":false,"fork":false,"pushed_at":"2018-11-06T20:56:50.000Z","size":17,"stargazers_count":121,"open_issues_count":12,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T21:38:01.671Z","etag":null,"topics":["cron","job","rust","schedule","task"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-01T22:26:33.000Z","updated_at":"2025-04-02T08:54:17.000Z","dependencies_parsed_at":"2022-09-26T20:31:43.685Z","dependency_job_id":null,"html_url":"https://github.com/mehcode/schedule-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Fschedule-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Fschedule-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Fschedule-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Fschedule-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehcode","download_url":"https://codeload.github.com/mehcode/schedule-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927839,"owners_count":20856198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron","job","rust","schedule","task"],"created_at":"2024-10-13T09:15:27.977Z","updated_at":"2025-04-03T03:11:46.139Z","avatar_url":"https://github.com/mehcode.png","language":"Rust","readme":"# schedule-rs\n![Rust](https://img.shields.io/badge/rust-nightly-red.svg)\n[![Crates.io](https://img.shields.io/crates/d/schedule.svg)](https://crates.io/crates/schedule)\n[![Docs.rs](https://docs.rs/schedule/badge.svg)](https://docs.rs/schedule)\n\u003e An in-process scheduler for periodic jobs. Schedule lets you run Rust functions on a cron-like schedule.\n\n## Install\n\n```toml\n[dependencies]\nschedule = { git = \"https://github.com/mehcode/schedule-rs\" }\n```\n\n## Usage\n\n```rust\nextern crate schedule;\nextern crate chrono;\n\nuse schedule::Agenda;\nuse chrono::UTC;\n\nfn main() {\n    let mut a = Agenda::new();\n\n    // Run every second\n    a.add(|| {\n        println!(\"at second     :: {}\", UTC::now());\n    }).schedule(\"* * * * * *\").unwrap();\n\n    // Run every minute\n    a.add(|| {\n        println!(\"at minute     :: {}\", UTC::now());\n    }).schedule(\"0 * * * * *\").unwrap();\n\n    // Run every hour\n    a.add(|| {\n        println!(\"at hour       :: {}\", UTC::now());\n    }).schedule(\"0 0 * * * *\").unwrap();\n\n    // Check and run pending jobs in agenda every 500 milliseconds\n    loop {\n        a.run_pending();\n\n        std::thread::sleep(std::time::Duration::from_millis(500));\n    }\n}\n```\n\n## License\n\nSchedule is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).\n\nSee LICENSE-APACHE and LICENSE-MIT for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehcode%2Fschedule-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehcode%2Fschedule-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehcode%2Fschedule-rs/lists"}