$EvaluationEnvironment
✖
$EvaluationEnvironment
gives a string indicating the type of local or cloud environment in which the current Wolfram Language evaluation is being performed.
Details

- Typical values for $EvaluationEnvironment include:
-
"Session" local or cloud interactive session "Script" script run in batch mode "Subkernel" parallel or grid subkernel "WebEvaluation" cloud evaluation initiated by an HTTP request "WebAPI" API called through an HTTP request "Scheduled" scheduled task "BatchJob" remote batch job - The "Script" environment is used by wolframscript for local script execution.
- The "WebEvaluation" environment is used by CloudEvaluate and by wolframscript -cloud.
- The "WebAPI" environment is used when code in Delayed, APIFunction, FormFunction, etc. is executed as a result of a web request.
- The "BatchJob" environment is used for code run via RemoteBatchSubmit and RemoteBatchMapSubmit.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (5)Survey of the scope of standard use cases

https://wolfram.com/xid/0v6l4asctw2fm-uou8s1

A remote evaluation inside CloudEvaluate:

https://wolfram.com/xid/0v6l4asctw2fm-x8cuui


https://wolfram.com/xid/0v6l4asctw2fm-4h6vj3


https://wolfram.com/xid/0v6l4asctw2fm-ogdtkn


https://wolfram.com/xid/0v6l4asctw2fm-hx4qec
An evaluation in a cloud task:

https://wolfram.com/xid/0v6l4asctw2fm-iswzkc

Once the task is finished, the saved environment can be retrieved:

https://wolfram.com/xid/0v6l4asctw2fm-hhxgtb

Parallel subkernels are identified as "Subkernel":

https://wolfram.com/xid/0v6l4asctw2fm-je5df2

Wolfram Research (2014), $EvaluationEnvironment, Wolfram Language function, https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html (updated 2019).
Text
Wolfram Research (2014), $EvaluationEnvironment, Wolfram Language function, https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html (updated 2019).
Wolfram Research (2014), $EvaluationEnvironment, Wolfram Language function, https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html (updated 2019).
CMS
Wolfram Language. 2014. "$EvaluationEnvironment." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html.
Wolfram Language. 2014. "$EvaluationEnvironment." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html.
APA
Wolfram Language. (2014). $EvaluationEnvironment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html
Wolfram Language. (2014). $EvaluationEnvironment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html
BibTeX
@misc{reference.wolfram_2025_$evaluationenvironment, author="Wolfram Research", title="{$EvaluationEnvironment}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html}", note=[Accessed: 08-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_$evaluationenvironment, organization={Wolfram Research}, title={$EvaluationEnvironment}, year={2019}, url={https://reference.wolfram.com/language/ref/$EvaluationEnvironment.html}, note=[Accessed: 08-May-2025
]}