可以在一个pm2服务上运行两个不同的脚本吗?

huangapple go评论66阅读模式
英文:

Can I run two different scripts on a pm2 service?

问题

可以在一个Ubuntu服务器上同时运行一个Node.js脚本和一个Python脚本,使用pm2服务吗?

还是我必须使用两个相同的脚本?

我尝试查找一些关于这个的信息,但我没有找到任何信息。我只知道可以运行Node.js脚本、Python脚本和其他脚本。

英文:

Can I run one nodejs script and one python script at the same time, on one ubuntu server with the pm2 service?

Or do I have to use two same scripts?

I tried to find some information about it but I didn't found anything. I only know that it is possible to run nodejs scripts and python scripts and other scripts.

答案1

得分: 1

你可以使用pm2来运行许多进程。

只需为要运行的每个进程发出一个pm2 start命令。

pm2 start -n "进程1" /路径/到/进程1
pm2 start -n "进程2" /路径/到/进程2
pm2 start -n "进程3" /路径/到/进程3
...
英文:

You can run many process with pm2.

Just issue a pm2 start command for each process you want to run.

pm2 start -n "Process 1" /path/to/process1
pm2 start -n "Process 2" /path/to/process2
pm2 start -n "Process 3" /path/to/process3
...

huangapple
  • 本文由 发表于 2023年1月9日 13:46:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/75053576.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定