示例#1
0
#! /usr/bin/env python
#coding=utf-8

import dealBusiness
import time

if __name__== "__main__":
	while True:
		dealBusiness.startBusiness()
		time.sleep(60)	
示例#2
0
#! /usr/bin/env python
#coding=utf-8

import dealBusiness
import time
import os
import sys
import datetime


configurl = sys.path[0] + '/config/'
logurl = sys.path[0] + '/log/'
err_log = logurl + "dealBusinessErr.log"

if __name__== "__main__":
	while True:
		isErr = dealBusiness.startBusiness()
		if type(isErr) is str:
			with open(r'%s'%err_log,'a') as error_log:
				print >> error_log,('%s 监控程序存在异常信息未处理,%s' % (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'),insert_log)) 			
		time.sleep(120)