Skip to content

Instantly share code, notes, and snippets.

@Kolossi
Kolossi / Dockerfile
Created June 21, 2020 17:26
carlosedp cluster-monitoring builder
FROM golang
VOLUME /go/manifests
WORKDIR /go
RUN PATH=$PATH:$GOPATH/bin ; go get github.com/bitnami/kubecfg \
&& apt update \
&& apt install -y vim \
&& git clone https://github.com/carlosedp/cluster-monitoring.git cluster-monitoring \
&& cd cluster-monitoring/ \
&& sed -i "/armExporter/,/\}/s/enabled: false/enabled: true/i" vars.jsonnet \
&& sed -i "/enablePersistence: {/,/},/s/\(prometheus\|grafana\): false/\1: true/i" vars.jsonnet \
--- windows-scheduled-task-create_v19.json Fri Jan 31 12:23:09 2020
+++ windows-scheduled-task-create_v20.json Fri Jan 31 12:21:13 2020
@@ -122,6 +122,16 @@
-ArgumentList @( "/Change", "/S", "localhost", "/TN", "`"$TaskName`"", "/ENABLE" );
}
+Function Disable-ScheduledTask($TaskName) {
+ # SCHTASKS /Change [/S system [/U username [/P [password]]]] /TN taskname
+ # { [/RU runasuser] [/RP runaspassword] [/TR taskrun] [/ST starttime]
+ # [/RI interval] [ {/ET endtime | /DU duration} [/K] ]