zoukankan      html  css  js  c++  java
  • 利用cmd实现组网产品任务

    #coding=utf-8
    import os,logging,ctypes,pdb
    import subprocess
    import time
    from datetime import datetime
    from datetime import timedelta
    aMinute=timedelta(minutes=-5)
    Now = datetime.now()
    a = Now + aMinute
    b=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: adar_operation est_bedoutputS3 -i="+radarfile+" /uc"
    # try:
    #     os.chdir(r"E: adar_operationexeLongJiang")
    #     p = subprocess.Popen(cmd,shell=True)#,stdout=subprocess.PIPE)
    # except:
    #     print 'error->run command ',cmd ,' failed!'

    cmd0 = r"RadaM.exe -o=E: adarexeoutputN3 -i=E: adarexeoutputS3 -t=%s  /uc"%Now.strftime('%Y%m%d%H%M')
    cmd1 = r"RadaM.exe -o=E: adarexeoutputN3 -i=E: adarexeoutputS3 -t=%s  /uc"%a.strftime('%Y%m%d%H%M')
    cmd2 = r"RadaM.exe -o=E: adarexeoutputN3 -i=E: adarexeoutputS3 -t=%s  /uc"%b.strftime('%Y%m%d%H%M')
    print 'cmd0=', cmd0
    print 'cmd1=', cmd1
    print 'cmd2=', cmd2
    try:
        os.chdir(r"E: adarexe")
        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!'

  • 相关阅读:
    WPF中各个Template的分析(转)
    WPF TreeView
    微信支付文章综合
    WPF 颜色渐变
    史上最全的厦门英语角!赶紧收藏啦!
    SQL008存储过程总结
    SQL SERVER事务处理
    HTTP 头部解释
    为你详细解读HTTP请求头的具体含意
    IIS部署常见问题总结
  • 原文地址:https://www.cnblogs.com/xiaoxiaoshuaishuai0219/p/6400308.html
Copyright © 2011-2022 走看看