https://github.com/a-jean-andreasian/pingpatrol
The best tool whether to keep free-tier websites awake, or to ping websites for monitoring their health. Works on all OS, including Windows. Operates natively without any external schedulers like cron or Task Scheduler.
https://github.com/a-jean-andreasian/pingpatrol
keep-awake pinger python scheduler vps
Last synced: 8 months ago
JSON representation
The best tool whether to keep free-tier websites awake, or to ping websites for monitoring their health. Works on all OS, including Windows. Operates natively without any external schedulers like cron or Task Scheduler.
- Host: GitHub
- URL: https://github.com/a-jean-andreasian/pingpatrol
- Owner: a-jean-andreasian
- License: cc-by-sa-4.0
- Created: 2025-07-19T06:27:21.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-27T21:47:32.000Z (10 months ago)
- Last Synced: 2025-07-27T23:26:44.948Z (10 months ago)
- Topics: keep-awake, pinger, python, scheduler, vps
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

---
The best tool whether to keep free-tier websites awake, or to ping websites for monitoring their health.
Works on all OS, including Windows, VPS systems or local machines without relying on external schedulers like `cron` or `Task Scheduler`.
---
## ๐ Features
- ๐ Built-in scheduler (no need for external tools)
- ๐ Periodically pings a list of websites
- ๐งต Threaded execution - pings are run concurrently
- ๐ง Smart rescheduling for stable uptime monitoring
- ๐ชต Simple log output with timestamps and HTTP status codes
- โ๏ธ Easily extensible and readable
- ๐ง Customizable daily, weekly, or custom frequency reporting logs to email
---
## ๐ป Usage
1. **Add sources**
You will be prompted at runtime to enter the list of URLs to monitor. Alternatively, modify the script to load from a file or hardcode.
JSON structure for sources:
```json
[
{"url": "https://example.com", "frequency": 10},
{"url": "https://example2.com", "frequency": 15}
]
```
2. **Run the program**
```bash
python script.py
````
Sample output:
```
Do you want to add sources? (y/n): y
Enter URL: https://example.com
Enter URL: https://google.com
...
Starting monitor...
Fri Jul 19 14:00:01 2025: https://example.com -> 200
Fri Jul 19 14:00:01 2025: https://google.com -> 200
...
```
---
## ๐ง Customization & possible contribution
* Modify ping interval by adjusting the reschedule logic
* Add persistent URL storage or alerting (email/Telegram/etc.)
* Swap `requests` with `httpx` for async if needed
---
## ๐ฆ Requirements
* Python 3.8+
* `requests`
Install dependencies:
```bash
pip install -r requirements.txt
```
---
## ๐ License
Creative Commons Attribution Share Alike 4.0 International, Armen-Jean Andreasian 2025