Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/9d4/heroku_capulus
A cli tool to make request to heroku or any host within interval.
https://github.com/9d4/heroku_capulus
Last synced: about 1 month ago
JSON representation
A cli tool to make request to heroku or any host within interval.
- Host: GitHub
- URL: https://github.com/9d4/heroku_capulus
- Owner: 9d4
- Created: 2022-02-07T08:26:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-30T07:54:59.000Z (over 2 years ago)
- Last Synced: 2024-06-21T07:36:27.972Z (7 months ago)
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heroku Capulus
[![Heroku Deploy](https://github.com/9d4/heroku_capulus/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/9d4/heroku_capulus/actions/workflows/main.yml)
A cli tool to make request to heroku or any server in an interval.
## Usage
Download the binary in [here](https://github.com/9d4/heroku_capulus/releases) based on your platform.
The configuration file is needed to run the binary. Put the config file in the same directory with the binary.
Configuration file should named as `config.json`. Customize the config based on your need.
The configuration file should at least look like below.```json
{
"interval": "10m",
"urls": [
"https://google.com",
"https://ask.com"
"https://duckduckgo.org"
],
"timezone": "Asia/Jakarta",
"startAt": "06:00",
"stopAt": "19:00",
"alwaysOn": false
}
```Or in toml `config.toml`.
```toml
interval = "10m"
urls = ["https://google.com"]
timezone = "Asia/Jakarta"
startAt = "06:00"
stopAt = "19:00"
alwaysOn = false
```Details:
- **interval** is gap between request. How long it should wait before next request.
e.g. `10m`, `1h10m`, `15m`, `1h10m15s`.- **urls** List of urls to be requested.
- **timezone** is the timezeone that used by `startAt` and `stopAt`.
- **startAt & stopAt** The tool will only run between the `startAt` and `stopAt`. Use 24 hour format.
- **alwaysOn** (optional) If alwaysOn option is set to true, the app will always run regardless the startAt and stopAt. alwaysOn option overrides the startAt and stopAt.
Once you have config set, you can just execute the binary file.
**Note:** the program prioritize the config.toml before config.json.
## Dev
Install dependencies:
```
$ go get
```Run:
```
$ go run .
```Build:
```
$ go build
```