import subprocess
import threading
import time

def loop():
    subprocess.call('nslookup google.com')
    time.sleep(60 * 30)
    
t = threading.Thread(target=loop)
t.daemon = True
t.start()
while t.is_alive():
    time.sleep(1)
    