4
$\begingroup$

I am trying to setup a web interface to a couple of Mathematica scripts, which in itself is quite simple:

<?php
$script = "myScript.wls";
echo shell_exec('wolframscript -print all -format List -file '.$script);

However, how can I make Mathematica execute the script in an already running local kernel, so that it doesn't go through the overhead of spawning a bunch of new ones every time (which ends up being a rather significant part of the HTTP request time)?

I tried doing this: Opening a notebook from command line in an existing front end instance
That's not the answer.

$\endgroup$
1
  • $\begingroup$ You could launch an HTTP server and then communicate with it, as shown here. $\endgroup$
    – C. E.
    Oct 1, 2018 at 6:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.