docs: update

pull/5/head
Evan Chen 2021-10-16 03:37:48 +08:00
parent ed13bf93aa
commit db3ff61a99
2 changed files with 21 additions and 1 deletions

View File

@ -25,7 +25,7 @@ build-unix:
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ))))
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:
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_darwin_arm64/$(PROJ))

View File

@ -19,16 +19,20 @@ Available Commands:
Flags:
-a, --all show local ip
-c, --cell show cell, must used with --list
--cron run as cron service
-h, --help help for myip
-u, --host string hostname to connect (default "kumoly.io")
-l, --list show list
-n, --name string tell the server who you are
--no-pub disable PublicIP
-p, --port string server port to connect (default "5080")
--secure use https
-s, --spec string hostname to connect (default "0 */5 * * * *")
-t, --title show title, used with --list
-v, --version version for myip
Use "myip [command] --help" for more information about a command.
```
## 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
```
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
@ -52,6 +62,16 @@ Hours | Yes | 0-23 | * / , -
Day of month | Yes | 1-31 | * / , - ?
Month | Yes | 1-12 or JAN-DEC | * / , -
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"`