开发者

How to concurrently run mongo scripts

How can I run

mongo myDbName script1.js

mongo myDbName script2.js

concurrently?

Is there a way to fork the execution? (I am searching for something like a --fork option like in mongod --fork)

Tha开发者_开发百科nks folks! Olmo


Running those two scripts is like running two commands on the shell.

Simplest thing would be to run them in two different shells. Or you can run them in background if you are not writing something important to stdout in those scripts.

In a more complex way, you can write a program which will fork and exec these two commands, but it's really an overkill.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜