{"id":45710152,"url":"https://github.com/ztroop/zephyr","last_synced_at":"2026-02-25T02:14:36.776Z","repository":{"id":291038758,"uuid":"976064343","full_name":"ztroop/zephyr","owner":"ztroop","description":"Unix Task Scheduler","archived":false,"fork":false,"pushed_at":"2025-05-26T01:51:54.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-14T19:15:41.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ztroop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-01T12:28:19.000Z","updated_at":"2025-05-26T01:46:46.000Z","dependencies_parsed_at":"2025-05-02T03:38:47.704Z","dependency_job_id":null,"html_url":"https://github.com/ztroop/zephyr","commit_stats":null,"previous_names":["ztroop/zephyr"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ztroop/zephyr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztroop%2Fzephyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztroop%2Fzephyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztroop%2Fzephyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztroop%2Fzephyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ztroop","download_url":"https://codeload.github.com/ztroop/zephyr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztroop%2Fzephyr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29809084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"online","status_checked_at":"2026-02-25T02:00:07.329Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-02-25T02:14:35.581Z","updated_at":"2026-02-25T02:14:36.769Z","avatar_url":"https://github.com/ztroop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zephyr 💨\n\n[![Build](https://github.com/ztroop/zephyr/actions/workflows/build.yml/badge.svg)](https://github.com/ztroop/zephyr/actions/workflows/build.yml)\n\nZephyr is a modern, lightweight task scheduler for Unix-like systems that runs as a background service. It combines the flexibility of CRON with the simplicity of interval-based scheduling, while handling system sleep and restarts gracefully. Perfect for automation tasks, backups, and periodic maintenance jobs.\n\n## Features\n\n- **Flexible Scheduling**: Supports both interval-based and CRON scheduling\n- **Immediate Execution**: Run commands immediately on startup\n- **Sleep Handling**: Automatically detects and recovers from system sleep\n- **State Persistence**: Saves command history and schedules between restarts\n- **Command Management**:\n  - Working directory and environment variable support\n  - Command timeout handling\n  - Minimum interval enforcement\n- **Service Integration**: Install as a system service (systemd/launchd)\n- **Cross-Platform**: Works on Linux and macOS\n- **TOML Configuration**: Simple, readable configuration format\n- **Detailed Logging**: Comprehensive execution and error logging\n\n## Configuration\n\n### Global Options\n\n- `log_level`: Logging level (e.g., \"info\", \"debug\", \"error\")\n- `min_interval_seconds`: Minimum time between command executions (1-3600 seconds, default: 30)\n- `state_path`: Path to the state database file (default: ~/.local/state/zephyr/state.db)\n- `max_immediate_executions`: Maximum number of immediate commands to execute on startup (1-100, default: 10)\n\n### Command Options\n\n- `name`: Unique identifier for the command\n- `command`: The command to execute\n- `interval_minutes`: How often to run the command (in minutes)\n- `cron`: CRON expression for scheduling (e.g., \"0 0 \\* \\* \\*\" for daily at midnight)\n- `max_runtime_minutes`: Optional timeout for command execution\n- `enabled`: Whether the command is active\n- `immediate`: Whether to run the command immediately on startup\n- `working_dir`: Optional working directory for the command\n- `environment`: Optional environment variables for the command. Values can be either direct strings or references to existing environment variables using `$VARIABLE_NAME` syntax.\n\nNote: You must specify either `interval_minutes` or `cron`, but not both.\n\nHere's an example configuration using both interval and CRON scheduling:\n\n```toml\n[general]\nlog_level = \"info\"\nmin_interval_seconds = 30\nstate_path = \"~/.local/state/zephyr/state.db\"\nmax_immediate_executions = 10\n\n[[commands]]\nname = \"backup\"\ncommand = \"backup.sh\"\ninterval_minutes = 60.0\nmax_runtime_minutes = 30\nenabled = true\nimmediate = true\nworking_dir = \"/backups\"\nenvironment = [\n    [\"BACKUP_DIR\", \"/data/backups\"],\n    [\"COMPRESSION\", \"gzip\"],\n    [\"PATH\", \"$PATH\"]\n]\n\n[[commands]]\nname = \"cleanup\"\ncommand = \"cleanup.sh\"\ncron = \"0 0 * * * *\"  # Run daily at midnight\nenabled = true\n```\n\n## Installation\n\n```sh\ngit clone git@github.com:ztroop/zephyr.git \u0026\u0026 cd ./zephyr\ncargo install --path .\n```\n\n## Usage\n\n```bash\n# Run with custom config file\nzephyr --config /path/to/config.toml\n\n# Run with custom state file\nzephyr --state-path /path/to/state.db\n\n# Reset state database\nzephyr --reset-state\n\n# Service management\nzephyr --install-service\nzephyr --uninstall-service\nzephyr --start-service\nzephyr --stop-service\n\n# Show help\nzephyr --help\n```\n\n#### Options\n\n- `-c, --config \u003cPATH\u003e`: Path to configuration file (default: ~/.config/zephyr/scheduler.toml)\n- `-s, --state-path \u003cPATH\u003e`: Path to state database file (default: ~/.local/state/zephyr/state.db)\n- `-r, --reset-state`: Reset the state database, clearing all command history\n- `-i, --install-service`: Install Zephyr as a system service\n- `-u, --uninstall-service`: Remove Zephyr service\n- `-S, --start-service`: Start the Zephyr service\n- `-X, --stop-service`: Stop the Zephyr service\n\n### Example Usage\n\n1. Create a configuration file:\n\n   ```bash\n   mkdir -p ~/.config/zephyr\n   touch ~/.config/zephyr/scheduler.toml\n   ```\n\n2. Edit the configuration to add your commands:\n\n   ```bash\n   nano ~/.config/zephyr/scheduler.toml\n   ```\n\n3. Run Zephyr:\n\n   ```bash\n   zephyr --config ~/.config/zephyr/scheduler.toml\n   ```\n\n4. Or install as a service:\n   ```bash\n   zephyr --install-service\n   zephyr --start-service\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztroop%2Fzephyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fztroop%2Fzephyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztroop%2Fzephyr/lists"}