From 9810fe2a8e096eeab8fa26b5549ecb059885d09f Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sat, 16 Oct 2021 03:37:48 +0800 Subject: [PATCH] docs: update --- Makefile | 2 +- README.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index abdc58c..4fc470f 100644 --- a/Makefile +++ b/Makefile @@ -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)) diff --git a/README.md b/README.md index 1a02c48..1714486 100644 --- a/README.md +++ b/README.md @@ -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**: `myip -altc --cron --spec "@every 5m"`