【发布时间】:2019-06-02 01:53:46
【问题描述】:
我有一个创建 JSON 文件的 python 应用程序。我需要每天在午夜、中午和晚上执行 3 次应用程序。
import json
def add():
a = 10
b = 20
c = a+b
f = open("add.json","w")
f.write(str(c))
def subtract():
a = 10
b = 20
c = b-a
f = open("subtract.json","w")
f.write(str(c))
add()
subtract()
我需要在指定时间自动运行应用程序
【问题讨论】:
-
您的代码不会创建任何
JSON!!!
标签: python-2.7 scheduled-tasks