【草稿】简单python脚本监控ORACle 数据

 基本思路:

1、编码脚本,测试通过后打包成exe

2、定时执行exe

3、好像2步就够啦

  • 打包exe

使用pyinstaller 将 Python 程序打包成 .exe 文件,参考:https://blog.csdn.net/bruce_6/article/details/82837088

OS: win7,CMD窗口

pyinstaller -F pyName.py
  • Python3.x:定时任务实现方式

参考 https://www.cnblogs.com/lizm166/p/8169028.html,建议如下,代码来自参考链接

def printHello():  
    print("start" )
    timer = threading.Timer(5,printHello)
    timer.start()
  
if __name__ == "__main__":  
    printHello()

踩得坑:网易拒绝了我……

猜你喜欢

转载自www.cnblogs.com/NigelLay/p/10665595.html