-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
send_at uses callr::r_bg() to schedule background sends. When the parent R process exits (e.g., Rscript -e completing), the child process is killed before it can send. This means send_at only works from interactive R sessions or scripts that explicitly keep the parent alive with a while(proc$is_alive()) Sys.sleep(10) loop.
Discovered during live testing — three scheduled sends all died silently when the spawning Rscript exited.
Proposed Solution
Test these approaches in order:
callr::r_bg(supervise = FALSE)— may detach child from parent lifecyclesystem2("Rscript", ..., wait = FALSE)— write a temp .R script and launch as a fully independent process- Document the limitation — if detaching isn't reliable, document that
send_atrequires the parent session to stay alive
Also related: the send_log and send_notify features (added in #2) now make silent failures visible, but the process still needs to survive to log anything.
Relates to NewGraphEnvironment/sred-2025-2026#1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels