I've read a number of questions and answers about this and wasn't able to accomplish it. So if this is really a duplicate please direct me to a previous question that can help.How can I schedule custom Mathematica code to run on my windows machine?
Ultimately I will haveneed to schedule a notebook that I've writtensome code to run on my computer (Windows, Mathematica 10. Right now I'm just0). I'm trying to get something to run via a command prompt so that I know I'm on the right track. Which I clearly am not.
I wroteI'm under the following test code, and put a Begin[] and End[] in it, which I think makes it a package. As I read it seemsimpression that I wouldn't be able to run a .nb file from a command line. The, so I've written the following test code isusing 'Begin' and 'End', which I think makes it a package:
BeginPackage["mkTest`"]
Print["abc"]
a = {{1, 2, 3}, {7, 6, 5}};
Export[NotebookDirectory[] <> "\\test.xlsx", "testCmd" -> a];
End[]
I putI've placed this rightdirectly in the Mathematica folder to get rid of some "variables". C:\Program Files\Wolfram Research\Mathematica\10.0
"C:\Program Files\Wolfram Research\Mathematica\10.0"
The following is a screen print of various command line attempts:
It seems the code isn't working or I'm not calling it properly, since no Excel file appears in my directory. Each of these attempts resulted in a window such as the following:
Also no Excel file appeared in my directory.
I've never tried to write a package before. I actually don't know if I do need to write a package. Can anyone tell me how to run Mathematica code from a Windows command line?
Is it necessary to write a package to run Mathematica code at the command line?
Can anyone point out why my attempts above fail?
How can I schedule custom Mathematica code to run on my windows machine?