New answers tagged


It is not a good idea to try to run a notebook in command line mode. Whether or not it is possible, it is just not a good idea because notebooks can only be handled by the Front End, which is not a command line tool. If you go this route anyway, expect difficulties. The usual way is to extract the code you want to run into a plain text .m file and run ...


I believe your graphics export is requiring a front end. This line below should cause it to run in background. UsingFrontEnd[Export["plot.png", Graphics[...]]] Alternatively try math -noicon -script file.m


UsingFrontEnd achieves the same result, although the notebook execution is no longer visible. runProcess.m UsingFrontEnd[ file = "C:\\myPath\\Process.nb"; targetnotebook = NotebookOpen[file, Visible -> True]; SelectionMove[targetnotebook, All, Notebook]; SelectionEvaluate[targetnotebook]; ]; Pause[5]; CloseFrontEnd[]; Problem solved ...


To replicate the Ctrl+A Enter execution behaviour automatically you can run Solve.nb from a package file, say runSolve.m, containing the code below. While Wolfram Language Scripts are straightforward, this method has the advantage that output can be saved in the notebook as if it was being run manually. (Developer`CellInformation usage thanks to Arnoud ...

Top 50 recent answers are included