ContinuousTask[expr]
represents a task in which expr is continuously reevaluated.
ContinuousTask[expr,end]
represents a task in which expr is continuously reevaluated until the time specified by end.
ContinuousTask[expr,tspan]
represents a task in which expr is continuously reevaluated over the time span tspan.
ContinuousTask
ContinuousTask[expr]
represents a task in which expr is continuously reevaluated.
ContinuousTask[expr,end]
represents a task in which expr is continuously reevaluated until the time specified by end.
ContinuousTask[expr,tspan]
represents a task in which expr is continuously reevaluated over the time span tspan.
Details and Options
- CloudSubmit[ContinuousTask[expr]] submits expr for continuous reevaluation in the cloud, starting immediately.
- Unless they contain blocking functions or Pause specifications, continuous tasks will typically make use of all available processor resources.
- ContinuousTask is intended primarily for private cloud installations, not the public Wolfram Cloud.
- If the evaluation of expr leads to abnormal termination or yields $Failed or a Failure object, a series of restarts will be attempted after progressively longer time intervals.
- Continuous tasks can be controlled using functions like TaskSuspend and TaskResume.
- The following options can be given:
-
NotificationFunction Automatic how to provide notifications RestartInterval Automatic how long to wait before restarting after failure TimeZone Automatic time zone for time specifications - In ContinuousTask[expr,end], end can be a DateObject or any other date and time specifier.
- In ContinuousTask[expr,tspan], tspan can be any Quantity object representing a time span.
Examples
open all close allBasic Examples (1)
In an appropriately configured private cloud, deploy a continuous task:
task = CloudDeploy[ContinuousTask[PutAppend[Now, CloudObject["dates"]]]]Monitor the task output by reading from the object it is appending to:
ReadList[CloudObject["dates"]]{DateObject[{2026, 2, 13, 17, 4, 40.5993694}, "Instant", "Gregorian", -6.], DateObject[{2026, 2, 13, 17, 5, 50.8701565}, "Instant", "Gregorian", -6.], DateObject[{2026, 2, 13, 17, 5, 56.3398975}, "Instant", "Gregorian", -6.]}Import["C:\\Users\\jfklein\\Downloads\\ExportMarkdown.wlt"]TaskRemove[task]Scope (2)
Deploy a continuous task with an end date:
task = CloudDeploy[ContinuousTask[PutAppend[Now, CloudObject["dates"]], Tomorrow]]TaskRemove[task]Deploy a continuous task that runs for 72 hours:
task = CloudDeploy[ContinuousTask[PutAppend[Now, CloudObject["dates"]], Quantity[72, "Hours"]]]TaskRemove[task]Options (3)
NotificationFunction (1)
RestartInterval (1)
TimeZone (1)
Deploy a task that uses $TimeZone set to GMT+2:
task = CloudDeploy[ContinuousTask[CloudPut[{$TimeZone, $TimeZoneEntity, Now, DateString[]}, "result"], None, TimeZone -> 2]]After waiting a few moments for it run, read from the result object that it wrote, noting the time zone setting was applied:
CloudGet["result"]DeleteObject[task]Possible Issues (1)
When ContinuousTask is evaluated in the cloud, it has restrictions on memory usage and evaluation time. The limitations are determined by your cloud plan, and the amounts can be found in CloudAccountData as "ScheduledTaskMemoryLimit" and "ScheduledTaskEvaluationTimeLimit":
CloudAccountData /@ {"ScheduledTaskMemoryLimit", "ScheduledTaskEvaluationTimeLimit"}Neat Examples (1)
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]TaskSuspend[o]The counter is no longer updating:
CloudGet[counterObj]DeleteObject[counterObj];
TaskRemove[o]Text
Wolfram Research (2015), ContinuousTask, Wolfram Language function, https://reference.wolfram.com/language/ref/ContinuousTask.html (updated 2017).
CMS
Wolfram Language. 2015. "ContinuousTask." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/ContinuousTask.html.
APA
Wolfram Language. (2015). ContinuousTask. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ContinuousTask.html
BibTeX
@misc{reference.wolfram_2026_continuoustask, author="Wolfram Research", title="{ContinuousTask}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ContinuousTask.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_continuoustask, organization={Wolfram Research}, title={ContinuousTask}, year={2017}, url={https://reference.wolfram.com/language/ref/ContinuousTask.html}, note=[Accessed: 12-June-2026]}