I would like to know if there is a tool to auto open and close a python script. For example, I would like my python script opens every 12 hours. In my script I have an infite loop. So after 12 hours, I need the script to be closed and reopened. Thank you.
Asked
Active
Viewed 250 times
2 Answers
0
You can use the watch command to open your script every 12 hours. More information on watch and an example: https://askubuntu.com/questions/430382/repeat-a-command-every-x-interval-of-time-in-terminal.
Closing the script can be done from within your script. More information and an example: Stop code after time period

Jasper
- 1,795
- 1
- 12
- 17