({{, (RefLink[TaskExecute, paclet:ref/TaskExecute])[task] 
immediately executes an instance of the specified task, independently of any schedule given.}})

OpenersNotesSection(Spacer1)Details

task can be either a (RefLink[TaskObject, paclet:ref/TaskObject]) or task identifier string for a specific task.

(RefLink[TaskExecute, paclet:ref/TaskExecute]) has attribute (RefLink[Listable, paclet:ref/Listable]).

For scheduled tasks, executing an instance of the task using (RefLink[TaskExecute, paclet:ref/TaskExecute]) does not affect the scheduled execution of other instances.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Specify a task:

obj=SessionSubmit[ScheduledTask[MessageDialog["Hello!"],None]]

Evaluate the task in the current session:

TaskExecute[obj]

Remove the task:

TaskRemove[obj]

OpenersExampleSection1(Spacer1)Scope  (2)

Start a task:

obj=CloudSubmit[ScheduledTask[
SendMail[<|"To"->$WolframID,"Subject"->"documentation example","Body":>DateObject[]|>],
{Tomorrow}
]]

Trigger the task to run asynchronously:

TaskExecute[obj]

Delete the task:

TaskRemove[obj]

Start a document generator:

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

Trigger the generator to run asynchronously:

TaskExecute[obj]

Delete the generator:

TaskRemove[obj]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TaskResume, paclet:ref/TaskResume])  ▪  (RefLink[TaskAbort, paclet:ref/TaskAbort])  ▪  (RefLink[Tasks, paclet:ref/Tasks])  ▪  (RefLink[TaskObject, paclet:ref/TaskObject])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Background & Scheduled Tasks, paclet:guide/BackgroundAndScheduledTasks])}})}})