{"id":29844473,"url":"https://github.com/luismedel/grony","last_synced_at":"2025-07-29T16:18:28.488Z","repository":{"id":64308461,"uuid":"573633433","full_name":"luismedel/grony","owner":"luismedel","description":"An utility to schedule git-related commands using crontab expressions.","archived":false,"fork":false,"pushed_at":"2023-01-23T07:18:49.000Z","size":38,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T14:04:29.326Z","etag":null,"topics":["cron","git","schedule"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luismedel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-03T00:17:35.000Z","updated_at":"2024-10-23T04:09:40.000Z","dependencies_parsed_at":"2023-02-12T21:15:21.640Z","dependency_job_id":null,"html_url":"https://github.com/luismedel/grony","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/luismedel/grony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismedel%2Fgrony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismedel%2Fgrony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismedel%2Fgrony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismedel%2Fgrony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luismedel","download_url":"https://codeload.github.com/luismedel/grony/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismedel%2Fgrony/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267718090,"owners_count":24133444,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"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":["cron","git","schedule"],"created_at":"2025-07-29T16:18:26.609Z","updated_at":"2025-07-29T16:18:28.474Z","avatar_url":"https://github.com/luismedel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grony\n\nAn utility to schedule git-related actions (`pull`, `commit` and `push` at this moment) using crontab expressions.\n\n## Installation\n\n\u003e Note: you need Python 3.\n\n```sh\n\u003e pip install grony\n```\n\nAfter that, should have a `grony` command available.\n\n```sh\n\u003e grony\n```\n\n## Usage\n\n`grony` consists of two components:\n\n- A long running process (the scheduler) used to schedule and launch git commands.\n- A client, used to manage the scheduler.\n\nFirst things first. You need to start the scheduler.\n\n## Starting the scheduler\n\nUsing whatever method you want (in a console, a startup script o anything supported in your OS) run:\n\n```sh\n\u003e grony start\n```\n\nThe tool will run in foreground. So it's advised yo use a way to leave it as a background process.\n\n### Starting the scheduler as a service in Linux\n\nTBD.\n\n### Starting the scheduler as a service in macOS\n\nUse the scripts located at `scripts/macOS` in this repo to add/remove a launchd for grony.\n\nTo enable the grony scheduler as a service and start automatically when the current user logs in.\n\n```sh\n\u003e scripts/macOS/add-launchd.sh\n```\n\nTo prevent the grony scheduler to start automatically when the current user logs in.\n\n```sh\n\u003e scripts/macOS/remove-launchd.sh\n```\n\n## Add a repository\n\nSay you want to execute an automatic commit on a repository located at `/sources/my-project`.\n\n```sh\n\u003e grony add /sources/my-project\nRepository friendly name [my-project]: \u003cpress enter\u003e\nSuccessfully added my-project\n```\n\nThat's it. That command instructs grony to schedule tasks for that repository. No to the next ste.\n\n## Configure actions\n\nYou need a way to tell grony what commands to run and when. Depending of your needs or personal preferences, you can use two ways:\n\n- A centralized one, configured in (whichever is found first):\n  - `$GRONY_CONFIG_PATH`\n  - `$XDG_CONFIG_HOME/.grony/grony.conf`\n  - `$HOME/.grony/grony.conf`.\n- A decentralized one, configured in each repo's `.grony` file.\n\n### Configuring actions in `grony.conf`\n\nOpen your `grony.conf` in a text editor. You should see something like this (you can ignore any value in the `[config]` section as it's used internally by the program)\n\n```ini\n[config]\nipc_port = 62830\nsecret = 4ac19f9d-7e18-4a0e-aa83-729c51bdddcf\n\n[repo 'my-project']\npath = /sources/my-project\n```\n\nYou must setup what to do in `my-project` in the section `[repo 'my-project']`.\n\nAvailable options are:\n\n- `pull-on`: a crontab-like expression detailing when to run `git pull`.\n- `pull-remote`: the remote name where to pull from (optional)\n- `commit-on`: a crontab-like expression detailing when to run `git add -A \u0026\u0026 git commit`.\n- `commit-message`: the commit message for `commit-on` (defaults to 'Auto commit at %Y%m%d %H:%M:%S').\n- `push-on`: : a crontab-like expression detailing when to run `git push`.\n- `push-remote`: the remote name where to push to (optional)\n\nYou don't have to set all values. Only those what you need. For example, if you only need to perform automatic commits every minute and you are ok with the default message, configure `commit-on` like this:\n\n```ini\n[repo 'my-project']\npath = /sources/my-project\ncommit-on = * * * * *\n```\n\nYou can configure all actions if you want. Remember that if they need to run at the same time, they'll run always in the this order: `pull-on`, `commit-on`, `push-on`.\n\n```ini\n[repo 'my-project']\npath = /sources/my-project\npush-on = @hourly         ; the config order you use does not matter\npull-on = @hourly\ncommit-on = @hourly\n```\n\n### Configuring actions in each repo's `.grony`\n\nYou can put a `.grony` file in the repository root with the following format:\n\n```ini\n[repo]\npush-on = @hourly\npull-on = @hourly\ncommit-on = @hourly\n```\n\nNote:\n\n- It does not contain a `[config]` section.\n- The section is called `[repo]`.\n- It does not contain the repository `path`.\n\nOutside of that, the settings are exactly the same.\n\nYou can use the following command to initialize a basic `.grony` file with default settings in a repository root:\n\n```sh\n\u003e grony init /sources/my-project\n```\n\n### Overriding `.grony` settings\n\nYou can have settings for a repo defined both in the `.grony` file and in your `grony.conf`.\n\nBoth settings will be merged at run time and any setting present in `grony.conf` **will override** the one in the `.grony` file.\n\n\u003e This is useful to override some settings on a per-machine basis, like the commit message, for example.\n\n### Updating settings\n\nYou can update any setting in any moment. grony will reload all files periodically to update the scheduled tasks.\n\n\u003e Note: this interval can be user-defined in `grony start` (see below).\n\n## More info\n\nJust use the integrated help for the rest of the commands. It's pretty self-explanatory.\n\n```\nUsage: grony [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  add     Adds a repository to the grony.conf file.\n  init    Initializes a .grony file in the specified path.\n  list    List all configured repositories.\n  remove  Removes a repository from the grony.conf file.\n  show    Show the effeective settings for a repository.\n  start   Starts the main process.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismedel%2Fgrony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluismedel%2Fgrony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismedel%2Fgrony/lists"}