16 lines
375 B
Python
16 lines
375 B
Python
import subprocess
|
|
import sys
|
|
import time
|
|
|
|
# Start Flask-app
|
|
flask_proc = subprocess.Popen([sys.executable, 'app.py'])
|
|
|
|
# Start adhan_cron.py elke minuut in een loop
|
|
try:
|
|
while True:
|
|
cron_proc = subprocess.Popen([sys.executable, 'adhan_cron.py'])
|
|
cron_proc.wait()
|
|
time.sleep(60)
|
|
except KeyboardInterrupt:
|
|
flask_proc.terminate()
|
|
sys.exit(0) |