{"id":21892024,"url":"https://github.com/capellax02/keep-alive-bot","last_synced_at":"2026-02-10T17:31:40.430Z","repository":{"id":263112895,"uuid":"889080161","full_name":"CAPELLAX02/keep-alive-bot","owner":"CAPELLAX02","description":"A simple Python-based bot designed to prevent free server hosting platforms from entering sleep mode by periodically sending requests to a specific URI. ","archived":false,"fork":false,"pushed_at":"2024-11-16T09:14:12.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T00:36:15.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/CAPELLAX02.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}},"created_at":"2024-11-15T15:15:51.000Z","updated_at":"2025-07-22T14:32:24.000Z","dependencies_parsed_at":"2024-11-16T09:36:55.364Z","dependency_job_id":null,"html_url":"https://github.com/CAPELLAX02/keep-alive-bot","commit_stats":null,"previous_names":["capellax02/request-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CAPELLAX02/keep-alive-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fkeep-alive-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fkeep-alive-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fkeep-alive-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fkeep-alive-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CAPELLAX02","download_url":"https://codeload.github.com/CAPELLAX02/keep-alive-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fkeep-alive-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29309593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-28T12:47:52.508Z","updated_at":"2026-02-10T17:31:40.385Z","avatar_url":"https://github.com/CAPELLAX02.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeepAlive Bot\n\nA simple Python-based bot designed to prevent free server hosting platforms from entering sleep mode by periodically sending requests to a specific URI. This ensures consistent server responsiveness and eliminates delays caused by server wake-ups.\n\n\n## 📝 Motivation\n\nI created this small bot because I host my backend project on a free server. If no requests are sent to the server within 15 minutes, the server goes into sleep mode, causing requests to be delayed by up to a minute. This bot sends a GET request to a specific public URI every 10 minutes, keeping the server awake and preventing these delays.\n\n\n## 🚀 Features\n\n- Sends periodic GET requests to a specified URI.\n- Highly customizable request intervals.\n- Easy-to-use, lightweight Docker deployment.\n- Securely loads configuration from a `.env` file.\n\n\n## 🛠️ Requirements\n\n- **Docker**\n- (Optional) Python 3.9+ (if running locally)\n\n\n## 📦 Installation and Usage\n\nFollow these steps to clone and run the project:\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/CAPELLAX02/keep-alive-bot.git\ncd keep-alive-bot\n```\n\n### 2. Set Up Environment Variables\n\nCreate a `.env` file in the project directory with the following content:\n\n```bash\nBACKEND_URL=https://your-backend-url.com\n```\nReplace `https://your-backend-url.com` with your server's public URI that you want to send a request.\n\n### 3. Build and Run the Docker Container\n\nBuild the Docker image:\n\n```bash\nsudo docker build -t keepalive-bot .\n```\n\nRun the Docker container:\n\n```bash\nsudo docker run -d --name keepalive-bot --restart always keepalive-bot\n```\n\n### 4. Verify the Logs\n\nCheck the container's logs to ensure the bot is working correctly:\n\n```bash\nsudo docker logs keepalive-bot -f\n```\nYou should see output like this:\n\n```bash\nBot started. Sending GET request every 10 minutes...\nSending GET request...\nGET request successful: {...response.json data...}\n```\n\n## ⚙️ Configuration\n\nThe bot uses the `schedule` library to send requests at regular intervals. By default, it sends a request every 10 minutes. To change this interval, update the following line in `bot.py`:\n\n```bash\nschedule.every(10).minutes.do(fetch_data)\n```\n\nFor testing purposes , you can set it to a shorter interval:\n\n```bash\nschedule.every(5).seconds.do(fetch_data)\n```\n\n## 🐞 Troubleshooting\n\n### Logs are empty or not updating:\n\n- Ensure the Docker container is running:\n\n```bash\nsudo docker ps\n```\n\n- Check the `.env` file for correct configuration.\n\n### GET requests fail:\n\n- Ensure the server URL is correct and reachable by using curl to test it:\n\n```bash\ncurl https://your-backend-url.com\n```\n\n## 🤝 Contributing\n\nContributions are welcome! If you have suggestions for improvements or new features, feel free to fork the repository, make changes, and submit a pull request. Alternatively, you can open an issue for discussion.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapellax02%2Fkeep-alive-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapellax02%2Fkeep-alive-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapellax02%2Fkeep-alive-bot/lists"}