here is my code
from apscheduler.schedulers.background import BackgroundScheduler
from datetime import datetime
def tick():
text = 'Tick! The time is: %s' % datetime.now()
saveLog(text)
if __name__ == '__main__':
scheduler = BlockingScheduler()
scheduler.add_job(tick, 'cron', hour=9)
scheduler.start()
Run Python In Terminal
python3 my.py &
在Linux中使用Screen可以让您在后台运行应用程序实例,
您正在寻找nohup
nohup my.py &
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.