The current \gls{mTask} engine for devices does not support \glspl{Task} in the
sense that the \gls{C}-view does. \Glspl{Task} used with the \gls{C}-view are a
main program that executes code and launches \glspl{Task}. It was also possible
to just have a main program. The current \gls{mTask}-system only supports main
programs which are the \glspl{Task} in their entirety. However, this results in
a problem. \glspl{Task} can not call other \glspl{Task} nor themselves.
Therefore, execution strategies have been added. Sending a \gls{Task} always
goes together with choosing a scheduling strategy. This strategy can be one of
the following three strategies:

\begin{itemize}
	\item\CI{OneShot}

		The \CI{OneShot} strategy consists of executing the \gls{Task} only
		once. In \gls{IoT} applications, often the status of a peripheral or
		system has to be queried only once on the request of the user. For
		example in a thermostat, the temperature is logged every 30 minutes.
		However, the user might want to know the temperature at that exact
		moment, and then they can just send a \CI{OneShot} \gls{Task} probing
		the temperature. After execution, the \gls{Task} will be removed from
		the memory of the client.
	\item\CI{OnInterval Int}

		\CI{OnInterval} is a execution strategy that executes the \gls{Task}
		in the given number of milliseconds. This strategy is very useful for
		logging measurements on an interval. Moreover, the strategy can be
		(ab)used to simulate recursion. \glspl{SDS} store global % chktex 36
		information and is persistent. The \CI{retrn} instruction --- as will
		be shown in Section~\ref{ssec:control} --- can then be used to
		terminate. Therefore, \glspl{Task} can be crafted that recursively call
		themselves using a \gls{SDS} to simulate arguments.
	\item\CI{OnInterrupt Int}

		Finally, a scheduling method is available that executes a \gls{Task}
		when a given interrupt is received. This method can be useful to launch
		a \gls{Task} on the press on hardware events such as the press of a
		button. Unfortunately, due to time constraints and focus, this
		functionality is only built in the protocol, none of the current client
		implementations support this.
\end{itemize}
