ContinuousTask[expr]
expr が連続的に再評価されるタスクを表す.
ContinuousTask[expr,end]
expr が end で指定されたときまで連続的に再評価されるタスクを表す.
ContinuousTask[expr,tspan]
expr が時間間隔 tspan の間連続的に再評価されるタスクを表す.
ContinuousTask
ContinuousTask[expr]
expr が連続的に再評価されるタスクを表す.
ContinuousTask[expr,end]
expr が end で指定されたときまで連続的に再評価されるタスクを表す.
ContinuousTask[expr,tspan]
expr が時間間隔 tspan の間連続的に再評価されるタスクを表す.
詳細とオプション
- CloudSubmit[ContinuousTask[expr]]は,クラウド内で連続的に再評価されるように expr を送信する.
- ブロック関数あるいはPause指定がない限り,連続タスクは使用可能なすべてのプロセッサリソースを使用する.
- ContinuousTaskは,主として公のWolframクラウドではなくプライベートのクラウドのためのものである.
- expr の評価が異常な終了の仕方をしたり$FailedあるいはFailureオブジェクトを返した場合は,時間間隔が次第に長くなる一連の再起動が試される.
- 連続タスクはTaskSuspendやTaskResumeのような関数を使って制御することができる.
- 使用可能なオプション
-
NotificationFunction Automatic どのように通知を提供するか RestartInterval Automatic 失敗の後で再起動するまでにどの位待つか TimeZone Automatic 時刻指定のための時刻帯 - ContinuousTask[expr,end]で,end はDateObjectあるいは任意の日付と時刻の指定でよい.
- ContinuousTask[expr,tspan]で,tspan は時間間隔を表すQuantityオブジェクトでよい.
例題
すべて開く すべて閉じる例 (1)
適切に構成されたプライベートクラウドで,連続タスクを配備する:
task = CloudDeploy[ContinuousTask[PutAppend[Now, CloudObject["dates"]]]]追加されるオブジェクトから読み出すことで,タスクの出力をモニターする:
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]スコープ (2)
task = CloudDeploy[ContinuousTask[PutAppend[Now, CloudObject["dates"]], Tomorrow]]TaskRemove[task]task = CloudDeploy[ContinuousTask[PutAppend[Now, CloudObject["dates"]], Quantity[72, "Hours"]]]TaskRemove[task]オプション (3)
NotificationFunction (1)
RestartInterval (1)
TimeZone (1)
GMT+2に設定した$TimeZoneを使用するタスクを配備する:
task = CloudDeploy[ContinuousTask[CloudPut[{$TimeZone, $TimeZoneEntity, Now, DateString[]}, "result"], None, TimeZone -> 2]]実行されるまでしばらく待った後,それが書き込んだ結果オブジェクトから,時刻帯設定が適用されたことに留意しつつ読み取る:
CloudGet["result"]DeleteObject[task]考えられる問題 (1)
ContinuousTaskのクラウド評価には,メモリ使用量と評価時間の制限がある.その制限はユーザのクラウドプランによって決定される.具体的な数値はCloudAccountDataの"ScheduledTaskMemoryLimit"および"ScheduledTaskEvaluationTimeLimit"で確認できる:
CloudAccountData /@ {"ScheduledTaskMemoryLimit", "ScheduledTaskEvaluationTimeLimit"}おもしろい例題 (1)
counterObj = CloudPut[0];o = With[{c = counterObj},
CloudDeploy[ContinuousTask[
Pause[5];i = CloudGet[c];CloudPut[i + 1, c]
]]
]CloudGet[counterObj]TaskSuspend[o]CloudGet[counterObj]DeleteObject[counterObj];
TaskRemove[o]関連するガイド
テキスト
Wolfram Research (2015), ContinuousTask, Wolfram言語関数, https://reference.wolfram.com/language/ref/ContinuousTask.html (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: 06-September-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: 06-September-2026]}