node.js - 电脑休眠本地 node 服务器可以保持运行状态吗?
PHP中文网
PHP中文网 2017-04-17 16:22:34
0
2
446

想做一个定时任务,比如每天早上七点发送消息.

但是电脑每天都会休眠,休眠服务器好像也跟着休眠了,反正是不再推送了

有没有办法能让服务器不休眠?

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
PHPzhong

Just set the computer not to sleep

伊谢尔伦

forever or pm2 can achieve never sleep; I use forever, install forever globally, and then go to the directory where you run node. If the usual startup is node app.js, just use forever start app.js here. . forever

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template