Start and stop scheduler for compute engines and cloud sql on GCP
- PRINT_LOG : 1/0
- SCHEDULER_DELAY : in second
- SCHEDULER_CONFIG_FILE : must be existing path
file at ./env/sample.env
- DAYS : separate by a comma. Sunday:0, Monday:1 ...
- TYPE : VM or SQL
- TIME : 00:00 to 23:59
If TYPE == SQL, then ZONE can be empty
configure this file on env: SCHEDULER_CONFIG_FILE
On Linux/Mac
$ tail -f /your-directory/action.log
$ tail -f /your-directory/error.log
$ lnav /your-directory/action.log /your-directory/error.log
On Windows
using windows power shell
$ type -wait {path to action.log or error.log}
$ GOOS=windows GOARCH=amd64 go build -o gcp-instance-scheduler.exe
$ GOOS=linux GOARCH=amd64 go build -o gcp-instance-scheduler
$ GOOS=darwin GOARCH=amd64 go build -o gcp-instance-scheduler
On windows
download the ./other/load-env.bat file
$ load-env.bat {.env file path}
On linux
$ set -o allexport; source {.env file path}; set +o allexport
On windows
$ gcp-instance-scheduler.exe
On linux
$ ./gcp-instance-scheduler
POST Method
- /private/time
- /private/day
- /private/clear-console
- /private/log-status
- /private/reverse-log-status