首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
如何在 flask web 服务器上自动运行一个数据采集脚本
mzmxcvbn
·
2017-04-21 14:23:05 +08:00
· 2384 次点击
这是一个创建于 2723 天前的主题,其中的信息可能已经有所发展或是发生改变。
想做一个工业数据监控的 B/S 系统,服务器定时采集底下硬件的数据,用户可以通过浏览器访问服务器看到实时数据。现在 flask 服务器架好了,底下数据采集的 py 脚本也写好了,但我不知道如何能让服务器一启动就一直运行那个定时采集数据的脚本,然后这个采集上来的数据应该怎么传递?
采集
服务器
脚本
flask
3 条回复
•
2017-04-26 08:24:03 +08:00
1
MagicL
2017-04-22 11:25:12 +08:00
方法 1 :定时执行数据采集脚本
方法 2 :采集脚本常驻运行
2
MagicL
2017-04-22 11:27:01 +08:00
数据可以保存到数据库,也可以存储到本地文件,在网站里面读数据
3
aznfy
2017-04-26 08:24:03 +08:00
1.把脚本写入服务器的自启动服务项里
2.采集的数据存数据库
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
933 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms ·
UTC 23:39
·
PVG 07:39
·
LAX 16:39
·
JFK 19:39
Developed with
CodeLauncher
♥ Do have faith in what you're doing.