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
Answered By – Mike Yan
Answer Checked By – Pedro (BugsFixing Volunteer)