Learn R Programming

crew (version 0.5.0)

crew_schedule: Create a schedule for bookkeeping tasks.

Description

Create an R6 object to contain and manage task objects.

Usage

crew_schedule(seconds_interval = 0.25)

Arguments

seconds_interval

Number of seconds between throttled iterations of task collection.

Details

Not a user-side function. There are no examples. Please see crew_controller_local() for details.

See Also

Other developer: crew_client(), crew_controller(), crew_launcher()

Examples

Run this code
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
schedule <- crew_schedule()
schedule$start()
schedule$push(task = mirai::mirai(1 + 1))
schedule$push(task = mirai::mirai(2 + 2))
Sys.sleep(4)
schedule$collect(throttle = FALSE)
schedule$pop()$data # numeric result
schedule$pop()$data # numeric result
schedule$pop()$data # NULL
}

Run the code above in your browser using DataLab