#coding=utf-8
import os,logging,ctypes,pdbimport subprocessimport timefrom datetime import datetimefrom datetime import timedeltaaMinute=timedelta(minutes=-5)Now = datetime.now()a = Now + aMinuteb=a +aMinute# print 'Now=', Now.strftime('%Y%m%d%H%M') # print 'a=',a.strftime('%Y%m%d%H%M') # print 'b=',b.strftime('%Y%m%d%H%M') # cmd = r"RadaS.exe -o=E:\radar_operation\test_bed\output\S3 -i="+radarfile+" /uc"# try:# os.chdir(r"E:\radar_operation\exe\LongJiang")# p = subprocess.Popen(cmd,shell=True)#,stdout=subprocess.PIPE)# except:# print 'error->run command ',cmd ,' failed!'cmd0 = r"RadaM.exe -o=E:\radarexe\output\N3 -i=E:\radarexe\output\S3 -t=%s /uc"%Now.strftime('%Y%m%d%H%M')cmd1 = r"RadaM.exe -o=E:\radarexe\output\N3 -i=E:\radarexe\output\S3 -t=%s /uc"%a.strftime('%Y%m%d%H%M')cmd2 = r"RadaM.exe -o=E:\radarexe\output\N3 -i=E:\radarexe\output\S3 -t=%s /uc"%b.strftime('%Y%m%d%H%M')print 'cmd0=', cmd0print 'cmd1=', cmd1print 'cmd2=', cmd2try: os.chdir(r"E:\radarexe") p0 = subprocess.Popen(cmd0,shell=True)#,stdout=subprocess.PIPE) p1 = subprocess.Popen(cmd1,shell=True) p2= subprocess.Popen(cmd2,shell=True)except: print 'error->run command ',cmd ,' failed!'