Wolfram Research

Function Repository Resource:

CloudNotebookEvaluate (1.0.0) current version: 1.1.0 »

Source Notebook

Evaluate a notebook from the cloud

Contributed by: Bob Sandheinrich

ResourceFunction["CloudNotebookEvaluate"][co]

evaluates the inputs in the cloud deployed notebook co.

Details

The cloud object co can be a CloudObject, URL or url string.

Examples

Basic Examples (4) 

Deploy a notebook with definitions in input cells:

In[1]:=
nbo = CreateDocument[{ExpressionCell[Defer[f[x_] := x^3], "Input"],
    ExpressionCell[Defer[g[x_] := x^3 - x], "Input"],
    ExpressionCell[Defer[RandomReal[100, 100]], "Input"]}];
CloudDeploy[nbo, "SimpleDefinitions.nb", Permissions -> "Public"]
Out[2]=

Evaluate the definitions from that notebook:

In[3]:=
Clear[f, g];
NotebookClose[nbo]
In[4]:=
result = ResourceFunction["CloudNotebookEvaluate"][
  CloudObject["SimpleDefinitions.nb"]]
Out[4]=

The definitions exist:

In[5]:=
f[10]
Out[5]=
In[6]:=
g[5]
Out[6]=

See the result of the evaluation:

In[7]:=
result["Output"]
Out[7]=

Scope (1) 

Specify the notebook using the URL directly:

In[8]:=
ResourceFunction["CloudNotebookEvaluate", ResourceVersion->"1.0.0"]["https://www.wolframcloud.com/obj/bobs/SimpleDefinitions.nb"]
Out[8]=

Version History

  • 1.1.0 – 29 March 2023
  • 1.0.0 – 20 September 2022

Related Resources

Author Notes

Perhaps, someday NotebookEvaluate will accept CloudObject inputs, and this function will be obsolete.

License Information