sudo easy_install python-daemon
#!/usr/bin/env python#encoding=utf-8import daemonimport timeimport oswith daemon.DaemonContext(): while True: print "aaa" os.system("date") time.sleep(3)