listen: Listen to the server

View source: R/jrc.R

listenR Documentation

Listen to the server

Description

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.

Usage

listen(time = Inf, activeSessions = NULL, condition = NULL)

Arguments

time

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.

Examples

## Not run: 
# to run this example an installed web browser is required
openPage()
listen(time = 3)
## End(Not run)


jrc documentation built on Aug. 23, 2023, 5:10 p.m.

Related to listen in jrc...