{"id":26930296,"url":"https://github.com/limitcool/nyar","last_synced_at":"2025-04-02T06:18:19.083Z","repository":{"id":216310299,"uuid":"741002475","full_name":"limitcool/nyar","owner":"limitcool","description":"nyar 是一个用 Rust 编写的任务管理程序，它可以让您在后台运行和管理各种任务，例如定时任务，启动任务，重启任务等。","archived":false,"fork":false,"pushed_at":"2024-01-10T12:21:58.000Z","size":29,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T11:46:30.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/limitcool/nyar/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limitcool.png","metadata":{"files":{"readme":"README-en.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}},"created_at":"2024-01-09T13:56:48.000Z","updated_at":"2024-12-19T08:28:59.000Z","dependencies_parsed_at":"2024-01-09T15:27:32.074Z","dependency_job_id":"b2596a87-a8b9-408c-adcc-7f85793c3c67","html_url":"https://github.com/limitcool/nyar","commit_stats":null,"previous_names":["limitcool/nyar"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fnyar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fnyar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fnyar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitcool%2Fnyar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limitcool","download_url":"https://codeload.github.com/limitcool/nyar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763881,"owners_count":20829800,"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":[],"created_at":"2025-04-02T06:18:18.563Z","updated_at":"2025-04-02T06:18:19.078Z","avatar_url":"https://github.com/limitcool.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"English| [简体中文](README.md)\n\n# `nyar`\n\n`nyar` is a task management program written in Rust, which allows you to run and manage various tasks in the background, such as scheduled tasks, start tasks, restart tasks, etc.\n\n- `nyar` uses the performance and security of Rust to ensure the rapid and stable execution of tasks.\n\n- `nyar` uses the YAML format configuration file, which allows you to easily create and modify task parameters and attributes.\n\n- `nyar` provides a concise command line interface, which allows you to easily control and view the status and output of tasks.\n\n- `nyar` supports multiple platforms, including Linux, Windows, and MacOS.\n\n## Installation\nyou can use Cargo to install nyar from crates.io:\n```bash\ncargo install nyar\n```\n\nOr, You can download the source code of `nyar` from [GitHub](https://github.com/limitcool/nyar), and then compile and install it using the cargo tool:\n\n\n```bash\ngit clone https://github.com/limitcool/nyar.git\ncd nyar\ncargo build --release\ncargo install --path .\n```\n\nOr you can directly download the binary file of `nyar` from [GitHub](https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html), and then put it into your system path:\n\n```bash\n# Linux\nwget https://github.com/limitcool/nyar/releases/download/v0.1.0/nyar-v0.1.0-x86_64-linux.tar.xz\nxz -d nyar-v0.1.0-x86_64-linux.tar.xz\ntar -xvf nyar-v0.1.0-x86_64-linux.tar\nchmod +x nyar-linux-x86_64\nmv nyar-linux-x86_64 /usr/local/bin/nyar\n```\n\n\n## Configuration\n\n`nyar` uses the YAML format configuration file, which allows you to easily create and modify task parameters and attributes.\n\nThe basic structure of the configuration file is as follows:\n\n```yaml\nis_push_enabled: false # Whether to enable push service\npush: # Push service configuration\n  push_plus_token: '' # pushplus token\ntasks: # Task list\n- name: DefaultTask # Task name\n  command: echo Nyar! # Task command\n  run_on_startup: true # Whether to run on startup\n  schedule: '*/10 * * * * *' # Task execution frequency\n  restart_after_stop: false # Whether to restart after stopping\n  enabled: true # Whether to enable the task\n```\n\nYou can add or delete tasks, or modify task parameters and attributes according to your needs. The meanings of task parameters and attributes are as follows:\n\n- `name`: Task name, must be unique, cannot contain spaces or special characters.\n- `command`: Task command, can be any valid shell command, can include environment variables or parameters.\n- `run_on_startup`: Whether to run on startup, can be `true` or `false`. If set to `true`, the task will be executed when the program starts. If set to `false`, the task will not be executed until manually started.\n- `schedule`: Task execution frequency, can be a cron expression representing how often the task is executed, or a timestamp representing when the task is executed once. The cron expression format is `seconds minute hour day month week`, for example `*/10 * * * * *` means execute the task every 10 seconds. If set to a timestamp, the task will only be executed once at that time.\n- `restart_after_stop`: Whether to restart after stopping, can be `true` or `false`. If set to `true`, the task will be restarted after it is executed or encounters an error until manually stopped. If set to `false`, the task will not be restarted after it is executed or encounters an error.\n- `enabled`: Whether to enable the task, can be `true` or `false`. If set to `false`, the task will not be executed unless manually started.\n\n## Usage\n\n`nyar` provides a concise command line interface that allows you to easily control and view the status and output of tasks. `nyar` supports the following commands:\n\n- `ls`: Lists detailed information about all tasks.\n- `new \u003cname\u003e \u003ccommand\u003e \u003cschedule\u003e \u003crun_on_startup\u003e \u003crestart_after_stop\u003e \u003cenabled\u003e`: Creates a new task and sets its attributes based on the provided parameters. The meaning of the parameters is the same as in the configuration file.\n- `stop \u003cname\u003e`: Stops the specified task, where `\u003cname\u003e` is the task name.\n- `start \u003cname\u003e`: Starts the specified task, where `\u003cname\u003e` is the task name.\n- `restart \u003cname\u003e`: Restarts the specified task, where `\u003cname\u003e` is the task name.\n- `exit | quit | q`: Exits the `nyar` program.\n- `help | h`: Displays help information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimitcool%2Fnyar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimitcool%2Fnyar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimitcool%2Fnyar/lists"}