({{, (RefLink[ContinuousTask, paclet:ref/ContinuousTask])[expr] 
represents a task in which expr is continuously reevaluated.}, {, (RefLink[ContinuousTask, paclet:ref/ContinuousTask])[expr,end]
represents a task in which expr is continuously reevaluated until the time specified by end.}, {, (RefLink[ContinuousTask, paclet:ref/ContinuousTask])[expr,tspan]
represents a task in which expr is continuously reevaluated over the time span tspan.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[CloudSubmit, paclet:ref/CloudSubmit])[ContinuousTask[expr]] submits expr for continuous reevaluation in the cloud, starting immediately.

Unless they contain blocking functions or (RefLink[Pause, paclet:ref/Pause]) specifications, continuous tasks will typically make use of all available processor resources.

(RefLink[ContinuousTask, paclet:ref/ContinuousTask]) is intended primarily for private cloud installations, not the public Wolfram Cloud.

If the evaluation of expr leads to abnormal termination or yields (RefLink[$Failed, paclet:ref/$Failed]) or a (RefLink[Failure, paclet:ref/Failure]) object, a series of restarts will be attempted after progressively longer time intervals.

Continuous tasks can be controlled using functions like (RefLink[TaskSuspend, paclet:ref/TaskSuspend]) and (RefLink[TaskResume, paclet:ref/TaskResume]).

The following options can be given:

In (RefLink[ContinuousTask, paclet:ref/ContinuousTask])[expr,end], end can be a (RefLink[DateObject, paclet:ref/DateObject]) or any other date and time specifier.

In (RefLink[ContinuousTask, paclet:ref/ContinuousTask])[expr,tspan], tspan can be any (RefLink[Quantity, paclet:ref/Quantity]) object representing a time span.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Deploy a continuous task, requesting notifications for all discrete runs:

o=CloudDeploy[ContinuousTask[
Pause[10];Now,
NotificationFunction->All
]]

Delete the task:

TaskRemove[o]

Prepare a cloud object containing a counter:

counterObj=CloudPut[0];

Update the counter from a continuous task:

o=With[{c=counterObj},
CloudDeploy[ContinuousTask[
Pause[5];i=CloudGet[c];CloudPut[i+1,c]
]]
]

Verify the counter has been updated:

CloudGet[counterObj]

Pause the task:

TaskSuspend[o]

The counter is no longer updating:

CloudGet[counterObj]

Delete the counter and task:

DeleteFile[counterObj];TaskRemove[o]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ScheduledTask, paclet:ref/ScheduledTask])  ▪  (RefLink[CloudSubmit, paclet:ref/CloudSubmit])  ▪  (RefLink[Do, paclet:ref/Do])  ▪  (RefLink[TaskAbort, paclet:ref/TaskAbort])  ▪  (RefLink[TaskSuspend, paclet:ref/TaskSuspend])  ▪  (RefLink[TaskResume, paclet:ref/TaskResume])  ▪  (RefLink[TaskExecute, paclet:ref/TaskExecute])  ▪  (RefLink[Pause, paclet:ref/Pause])  ▪  (RefLink[SendMail, paclet:ref/SendMail])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Automated Reports, paclet:guide/AutomatedReports])}, {▪(RefLinkPlain[Background & Scheduled Tasks, paclet:guide/BackgroundAndScheduledTasks])}, {▪(RefLinkPlain[Cloud Functions & Deployment, paclet:guide/CloudFunctionsAndDeployment])}, {▪(RefLinkPlain[Accessing External Services & APIs, paclet:guide/AccessingExternalServicesAndAPIs])}})}})