({{, EvaluateScheduledTask[expr] 
triggers immediate local execution of the specified task object.}})

OpenersNotesSection(Spacer1)Details

For local tasks, EvaluateScheduledTask returns the specified (RefLink[ScheduledTaskObject, paclet:ref/ScheduledTaskObject]). For cloud tasks, the task output is returned. For document generators, the generated document is returned as a (RefLink[CloudObject, paclet:ref/CloudObject]).

Evaluation of the specified task takes place synchronously in the current Wolfram Language session, without invoking any cloud mechanisms for task execution. Notification, logging, archiving, and delivery to recipients are bypassed.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Specify a task with a future start date:

obj=RunScheduledTask[MessageDialog["text"],{1},AbsoluteTime[{2020,1,1,0,0,0}]]

Evaluate the task in the current session:

EvaluateScheduledTask[obj]

Remove the task:

RemoveScheduledTask[obj]

OpenersExampleSection1(Spacer1)Scope  (2)

EvaluateScheduledTask causes cloud scheduled tasks to evaluate locally and synchronously, bypassing notification and logging:

obj=CloudDeploy[ScheduledTask[
{$MachineName,$MachineType},
{Tomorrow}
]]

Trigger the task to run locally and synchronously:

With[{o=obj},EvaluateScheduledTask[o]]

Delete the task:

RemoveScheduledTask[obj]

EvaluateScheduledTask also causes document generators to evaluate synchronously, bypassing notification, logging, distribution, and archiving:

obj=CloudDeploy[DocumentGenerator[File["ExampleData/BasicTemplate.nb"],None,DeliveryFunction->Automatic]]

Trigger the generator to run synchronously:

With[{o=obj},EvaluateScheduledTask[o]]

Delete the generator:

RemoveScheduledTask[obj]

OpenersExampleSection2(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)GeneratedDocumentBinding  (1)

Use the (RefLink[GeneratedDocumentBinding, paclet:ref/GeneratedDocumentBinding]) option to override the configured driver of a document generator. Deploy a document generator:

co=CloudDeploy[
DocumentGenerator[File["ExampleData/BasicTemplate.nb"],<|"author":>$WolframID|>,None
]
]

Trigger the generator to run synchronously, overriding the driver:

With[{o=co},EvaluateScheduledTask[o,GeneratedDocumentBinding-><|"author"->"Anonymous"|>]]

Delete the generator:

RemoveScheduledTask[co]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[AbsoluteTime, paclet:ref/AbsoluteTime])  ▪  (RefLink[Clock, paclet:ref/Clock])  ▪  (RefLink[Refresh, paclet:ref/Refresh])  ▪  (RefLink[ScheduledTask, paclet:ref/ScheduledTask])  ▪  (RefLink[DocumentGenerator, paclet:ref/DocumentGenerator])  ▪  (RefLink[CloudDeploy, paclet:ref/CloudDeploy])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Date and Time Functions, paclet:tutorial/DateAndTimeFunctions])}, {▪(RefLinkPlain[Controlling Infinite Evaluation, paclet:tutorial/ControllingInfiniteEvaluation])}})}})