When R session is not interactive, messages from the server are not processed automatically. In this case, one needs to
keep this function running.
This function, is a wrapper around run_now or service. It runs
the service in a loop with a specified condition.
Time (in seconds), during which the R session should listen to the server. By default, the function runs until
it is not interrupted (time = Inf).
activeSessions
The function runs, until there is at least one active session in the provided app. If there is only
one active app, this argument can be set to TRUE for the same effect.
condition
Custom condition. This argument must be a function that returns TRUE or FALSE. R session will
listen to the server, while the condition function returns TRUE.