Hi
I wanted to run Mathmetica script from windows task scheduler,
so I created two files,
Test.nb file containing the Mathematica code to export a graph like below
resultChart = JuliaSetPlot[0.365 - 0.37 I];
Export["C:\\Dev\\test.png", resultChart];
Solve.m file to run the above notebook like below
Needs["JLink`"];
$FrontEndLaunchCommand =
"C:\\Program Files\\Wolfram \
Research\\Mathematica\\11.0\\Mathematica.exe";
UsingFrontEnd[Module[{}, file = "C:\\Dev\\TestPng.nb";
targetnotebook = NotebookOpen[file, Visible -> True];
SelectionMove[targetnotebook, Next, Cell];
SelectionEvaluate[targetnotebook];
NotebookSave[targetnotebook];
]];
Pause[10];
Created a task in windows 10, task scheduler
However when I run this task, I cannot see any graph exported to C:\dev folder
What am I doing wrong here, I cannot see any errors when I manually run Solve.m or Test.nb file in Mathematica?
Can you please help.
Thanks.
Nalina