diff --git a/README.md b/README.md index d4f5a59..2e8fcd9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ Ambient temperature is read from `/sys/bus/w1/devices` so you must have 1wire en # compilation and usage `make` or `gcc main.c -o measurer` \ Should throw no warnings \ -`./measurer ` +`./measurer ` \ +You can schedule this with [systemd](/src/branch/master/systemd) # why like heavy ahh like databases grafana etc go away you're a performance monitor why'd you reduce performance \ No newline at end of file diff --git a/systemd/measurer.service b/systemd/measurer.service new file mode 100644 index 0000000..03f5076 --- /dev/null +++ b/systemd/measurer.service @@ -0,0 +1,11 @@ +[Unit] +Description=measurer + +[Service] +User=pi +Group=pi +WorkingDirectory=/home/pi/measurer +ExecStart=/home/pi/measurer/measurer /home/pi/measurer/data.csv + +[Install] +WantedBy=multi-user.target diff --git a/systemd/measurer.timer b/systemd/measurer.timer new file mode 100644 index 0000000..29ac0ae --- /dev/null +++ b/systemd/measurer.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Say Hello every 10 seconds + +[Timer] +OnBootSec=10 +OnUnitActiveSec=10 +AccuracySec=1 + +[Install] +WantedBy=timers.target