zoukankan      html  css  js  c++  java
  • 紫微设置定时任务

    # -*- coding: utf-8 -*-
    #!/bin/python




    import requests,json
    import time
    import threading


    address = 'https://sitcloud.test.webank.com/we'
    i = 0

    def record_birthday_seat(name, seat, birthday):
    global i
    i += 1
    payload = {'user':name, 'seat':seat, 'birthday':birthday}
    response = requests.post('%s/record_birthday_seat'%address, data=json.dumps(payload))
    print(time.strftime("%Y-%m-%d %H:%M:%S") +' : response 第' + str(i) + '次')
    print(response.text)
    t = threading.Timer(1, record_birthday_seat, ('wezwsong', 's22668', '2019-06-24'))#设置定时任务
    t.start()


    if __name__ == "__main__":
    record_birthday_seat('wezwsong', 's22668', '2019-06-24')
  • 相关阅读:
    02-模板字符串
    01-学习vue前的准备工作
    21-z-index
    20-定位
    19-background
    18-超链接导航栏案例
    17-文本属性和字体属性
    16-margin的用法
    jBPM
    Table of Contents
  • 原文地址:https://www.cnblogs.com/zhaobobo10/p/11095056.html
Copyright © 2011-2022 走看看