docs: update
parent
ed13bf93aa
commit
db3ff61a99
2
Makefile
2
Makefile
|
@ -25,7 +25,7 @@ build-unix:
|
||||||
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ))))
|
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ))))
|
||||||
|
|
||||||
build-win:
|
build-win:
|
||||||
$(shell export GOOS=windows; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_windows_arm64/$(PROJ).exe)
|
$(shell export GOOS=windows; export GOARCH=amd64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_windows_amd64/$(PROJ).exe)
|
||||||
|
|
||||||
build-mac-m1:
|
build-mac-m1:
|
||||||
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_darwin_arm64/$(PROJ))
|
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_darwin_arm64/$(PROJ))
|
||||||
|
|
20
README.md
20
README.md
|
@ -19,16 +19,20 @@ Available Commands:
|
||||||
Flags:
|
Flags:
|
||||||
-a, --all show local ip
|
-a, --all show local ip
|
||||||
-c, --cell show cell, must used with --list
|
-c, --cell show cell, must used with --list
|
||||||
|
--cron run as cron service
|
||||||
-h, --help help for myip
|
-h, --help help for myip
|
||||||
-u, --host string hostname to connect (default "kumoly.io")
|
-u, --host string hostname to connect (default "kumoly.io")
|
||||||
-l, --list show list
|
-l, --list show list
|
||||||
|
-n, --name string tell the server who you are
|
||||||
--no-pub disable PublicIP
|
--no-pub disable PublicIP
|
||||||
-p, --port string server port to connect (default "5080")
|
-p, --port string server port to connect (default "5080")
|
||||||
--secure use https
|
--secure use https
|
||||||
|
-s, --spec string hostname to connect (default "0 */5 * * * *")
|
||||||
-t, --title show title, used with --list
|
-t, --title show title, used with --list
|
||||||
-v, --version version for myip
|
-v, --version version for myip
|
||||||
|
|
||||||
Use "myip [command] --help" for more information about a command.
|
Use "myip [command] --help" for more information about a command.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
@ -40,6 +44,12 @@ docker pull hub.kumoly.io/tools/myip:latest
|
||||||
docker run --name myip-server -d -p 5080:5080 --restart=always hub.kumoly.io/tools/myip
|
docker run --name myip-server -d -p 5080:5080 --restart=always hub.kumoly.io/tools/myip
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Client:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker pull hub.kumoly.io/tools/myip:latest
|
||||||
|
docker run --name myip -d --restart=always hub.kumoly.io/tools/myip myip --cron --spec "@hourly"
|
||||||
|
```
|
||||||
|
|
||||||
## Cron
|
## Cron
|
||||||
|
|
||||||
|
@ -52,6 +62,16 @@ Hours | Yes | 0-23 | * / , -
|
||||||
Day of month | Yes | 1-31 | * / , - ?
|
Day of month | Yes | 1-31 | * / , - ?
|
||||||
Month | Yes | 1-12 or JAN-DEC | * / , -
|
Month | Yes | 1-12 or JAN-DEC | * / , -
|
||||||
Day of week | Yes | 0-6 or SUN-SAT | * / , - ?
|
Day of week | Yes | 0-6 or SUN-SAT | * / , - ?
|
||||||
|
|
||||||
|
Entry | Description | Equivalent To
|
||||||
|
----- | ----------- | -------------
|
||||||
|
@yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 *
|
||||||
|
@monthly | Run once a month, midnight, first of month | 0 0 0 1 * *
|
||||||
|
@weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0
|
||||||
|
@daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
|
||||||
|
@hourly | Run once an hour, beginning of hour | 0 0 * * * *
|
||||||
|
|
||||||
|
@every <duration>
|
||||||
```
|
```
|
||||||
|
|
||||||
**Duration**: `myip -altc --cron --spec "@every 5m"`
|
**Duration**: `myip -altc --cron --spec "@every 5m"`
|
||||||
|
|
Loading…
Reference in New Issue