https://github.com/alexcoder04/kangaroo
Run a command if signaled
https://github.com/alexcoder04/kangaroo
command-line command-line-tool go golang interval kangaroo shell signals
Last synced: 9 months ago
JSON representation
Run a command if signaled
- Host: GitHub
- URL: https://github.com/alexcoder04/kangaroo
- Owner: alexcoder04
- License: gpl-3.0
- Created: 2022-06-24T20:41:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-02T11:49:56.000Z (about 3 years ago)
- Last Synced: 2025-02-09T08:23:41.508Z (11 months ago)
- Topics: command-line, command-line-tool, go, golang, interval, kangaroo, shell, signals
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kangaroo
Runs a command if signaled or in specific time intervals
## Installation
```sh
git clone https://github.com/alexcoder04/kangaroo.git
cd kangaroo
# build a binary and run it
go build .
./kangaroo
# install to your $GOPATH
go install .
```
## Usage
### Execute on signal
```sh
kangaroo -signal 2 echo "Hello World!"
```
This will execute `echo "Hello World!"` if kangaroo gets signaled with
`SIGRTMIN+2`. If no signal number is passed, kangaroo assumes `1`. If you pass
`0` as signal number, kangaroo will not listen at all.
### Execute in time intervals
```sh
kangaroo -interval 3 echo "Hello World!"
```
This will execute `echo "Hello World!"` every 3 seconds. If no number is passed,
kangaroo will not execute your command periodically.