{"id":16655267,"url":"https://github.com/hexiro/herokron","last_synced_at":"2025-05-12T21:31:08.298Z","repository":{"id":56292205,"uuid":"312072000","full_name":"hexiro/herokron","owner":"hexiro","description":"Easily switch Heroku apps on/off from CLI. Supports multiple accounts. ","archived":true,"fork":false,"pushed_at":"2021-09-20T20:38:55.000Z","size":105,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T21:15:15.778Z","etag":null,"topics":["cron","heroku","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-11T19:40:29.000Z","updated_at":"2024-07-03T06:57:28.000Z","dependencies_parsed_at":"2022-08-15T16:10:19.874Z","dependency_job_id":null,"html_url":"https://github.com/hexiro/herokron","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/hexiro%2Fherokron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexiro%2Fherokron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexiro%2Fherokron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexiro%2Fherokron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexiro","download_url":"https://codeload.github.com/hexiro/herokron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253825012,"owners_count":21970116,"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","heroku","python","python3"],"created_at":"2024-10-12T09:52:26.949Z","updated_at":"2025-05-12T21:31:08.009Z","avatar_url":"https://github.com/hexiro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Herokron\n\nHerokron is a python package used to make switching [Heroku](https://heroku.com/) apps on/off easy, especially between accounts. The primary use case is from the command line in the form of a cron job (hence the ending *kron*), but Herokron does work in a python file.\n\n![Forks](https://img.shields.io/github/forks/Hexiro/Herokron)\n![Stars](https://img.shields.io/github/stars/Hexiro/Herokron)\n![Issues](https://img.shields.io/github/issues/Hexiro/Herokron)\n![License](https://img.shields.io/github/license/Hexiro/Herokron)\n\n\n## 📦 Installation\n\nInstall the package with pip.\n\n```\npip3 install git+https://github.com/Hexiro/herokron\n```\n\n\n## 💾 Setup\n\nLoad API keys, and setup logging\n```console\n$ herokron --add-key {key} \n$ herokron --set-webhook {discord_webhook}\n$ herokron --set-color {discord_embed_color}\n```\nView the database to make sure everything is working.\n```console\n$ herokron -database\n```\n\n##  🖥️ Usage\n\n### Command Line\n\n```console\n$ herokron --help\n```\napp commands (classified by leading -)\n```console\n  -on ON                \t\tCalls the `on` function to turn an app on.\n  -off OFF              \t\tCalls the `off` function to turn an app off.\n  -status STATUS        \t\tCalls the `status` function view the current status of an app.\n```\ndatabase commands (classified by leading --)\n```\n  --database [DATABASE]  \t\tPrints the formatted database.\n  --add-key ADD_KEY     \t\tAdds the Heroku API key specified.\n  --remove-key REMOVE_KEY\t\tRemoves the Heroku API key specified.            \n  --set-webhook SET_WEBHOOK\t\tSets the Discord Webhook URL for logging.                    \n  --set-color SET_COLOR\t\t\tSets the Discord Embed Color.\n  --no-log [NO_LOG]     \t\tStops this iteration from logging.\n  --no-print [NO_PRINT]\t\t\tStops this iteration from printing.\n```\n\n### Python\n\napp commands\n```py\nimport herokron\nherokron.on(\"herokron-example\")\nherokron.off(\"herokron-example\")\nherokron.status(\"herokron-example\")\n```\n\nwhile they function correctly, it's not exactly practical because the database is still loaded from the database file so that has to be set before hand.\n\n# ⌛ Cron\nThe following example will start a Heroku app everyday at 8 am.\n\n### crontab\n```\n0 8 * * * herokron -on [app]\n```\n\nIf this isn't working, cron is most likely just having issues finding Herokron. If this happens, you will need to specify the Herokron path. \n\n### command line\n```\n$ which herokron\n/home/pi/.local/bin/herokron\n```\n### crontab\n```\n0 8 * * * /home/pi/.local/bin/herokron -on [app]\n```\n\n\n# Contributing\nPull requests are always 100% welcomed and appreciated. Right now, I have no way of testing Mac OS and other Linux distributions. All modern operating systems should work, as  they're only used to find the local database file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexiro%2Fherokron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexiro%2Fherokron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexiro%2Fherokron/lists"}