python 实现定时任务

import time
import requests
def dojob():
	requests.get('http://localhost:8080/echarts')
	print("运行任务")
def loopfun():
	while True:
		dojob()
		time.sleep(30)
loopfun()

  

posted @ 2020-12-23 19:55  睁yan-ii  阅读(74)  评论(0编辑  收藏  举报