# How to turn off the PiTFT at night on BalenaOS

**URL:** <https://forums.balena.io/t/how-to-turn-off-the-pitft-at-night-on-balenaos/52928>\
**Category:** balenaOS\
**Tags:** raspberrypi3\
**Created:** [December 25, 2019, 1:07pm UTC](https://forums.balena.io/t/how-to-turn-off-the-pitft-at-night-on-balenaos/52928 "2019-12-25T13:07:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drew](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@drew](https://forums.balena.io/u/drew)\
**Post date:** [December 25, 2019, 1:07pm UTC](https://forums.balena.io/t/how-to-turn-off-the-pitft-at-night-on-balenaos/52928/1 "2019-12-25T13:07:57Z")

</div>

Hi everyone!  
I am currently running the pihole project on my balenaOS-powered raspberry pi 3 + 2.8" capacitive adafruit pitft display. All works great but the only thing which bothers me a lot is that the pitft display emits plenty of light during night time, so I would love to schedule the display turn off/on depending on the day/night time.

The only related info I have found online is in [this article](https://learn.adafruit.com/pi-hole-ad-pitft-tft-detection-display/install-padd) which, in short, uses cron with the following commands:

```auto
# PADD Sleep
# Turn off the PiTFT+ at midnight
00 00 * * * sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'
# Turn on the PiTFT+ at 8:00 am
00 08 * * * sh -c 'echo "1" > /sys/class/backlight/soc\:backlight/brightness'

```

But this does not work for balenaOS (at least for me - I may definitely miss some balenaos-related details).

I wonder how this is supposed to be achieved on BalenaOS?  
Please point me to the right direction.

Thank you.
