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.
精彩评论