Command Line with .mox file

A .mox file, with MOX code in it, can be run from the command line while a Moxie.Build system is not otherwise already running.


Moxie.exe Filename[ ?URLparams]



The code in the .mox file will be run as if it was a public method, with any optional URL Params placed into the Request query. The full "Moxie.exe" name must be used (not just "Moxie") and the filename must end in .mox. Any URL Params must start with the ?

In most use cases, the .mox file will be a single line of code that simply calls an existing Public Method already in the system, but there is no limit on what code the .mox file includes.

Procedures in a system that can be called when running and from the command line which may need to know which context they are running under, can make use of the Req.IsCmdMox Request query value, which is set to true when running a .mox file from the command line.



Moxie.exe RunMeWithNoParams.mox
Moxie.exe RunMeWithParams.mox ?Param1=Abc&Param2=Def
cd \work\
.\Moxie.exe C:\Util\ProProc\MOX\Nightly.mox ?DoThing1=y&DoThing2=y