[SOLVED] Set time to automatically run and close the program Qt in Pi4


For some reason I need to run a Qt program on my Pi4 between 7am and 10pm, the rest of the time the program closes. This needs to happen automatically every day. I tried but it didn’t work, the program couldn’t open and close automatically as I wanted. Who can help me?


You can use crontab to run some script to start your program at 7am, then run another script to close the program at 10pm.

For example, add codes below in crontab and you can run and stop some program everyday.

0 7 * * * start.sh
0 22 * * * stop.sh

crontab tutorial

Answered By – Mike Yan

Answer Checked By – Pedro (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *