Timers and Roblox script signals
Contents
What triggers automation
A plain print("reconnect"), Console text, or Roblox chat message does not trigger recovery. Signals use getgenv().PotassiumSession over the local WebSocket.
Requirements: linked account, saved Recovery target, auto-attach/recovery/signals enabled, unlocked vault, and a runtime executing the bridge with WebSocket.connect support. The bridge is sent after attach. Its source being present does not prove it executes in current Roblox.
GUI settings
Account setup → Session cache, script signals & schedule.
| Field | Units/range |
|---|
| Enable game-script signals and scheduled reconnects | Enables bridge and auto-attach/recovery |
| Connection interval | Minutes: 0 for script requests only, otherwise 1–1440 |
| Hold time | Minutes: 0 to stay until reconnect, otherwise less than interval |
| Heartbeat timeout | Seconds: 45–3600 |
| Allowed folders | Up to 32 exact names, one per line, each 1–48 characters |
Example: interval 30 minutes, hold 10. After first onlineReported, work for about 10 minutes, close for the cycle, then schedule launch no earlier than the 30-minute boundary. Loading, recovery delay, and network affect actual entry; this is not a precise clock schedule.
Waiting for the bridge
Use bounded waiting because connection may finish after the assigned script is delivered:
local function waitForPotassium(timeoutSeconds)
local deadline = os.clock() + timeoutSeconds
repeat
local bridge = getgenv().PotassiumSession
if bridge then return bridge end
task.wait(0.25)
until os.clock() >= deadline
error("Potassium session bridge did not connect")
end
local session = waitForPotassium(30)
assert(session.Reconnect(60), "Could not send reconnect request")
An unconditional reconnect on every attachment creates a repeating reconnect cycle.
API
| Call | Behavior |
|---|
| Reconnect(seconds) | Requests recovery of the current account; default 0 seconds |
| Schedule(seconds) | Schedules current-account recovery |
| ScheduleFolder(name, seconds) | Launches inactive accounts in an allowed folder after a delay |
| ReportDisconnected() | Reports explicit disconnect/error; native recovery decides what follows |
| Close() | Stops the bridge and socket; does not stop recovery |
Delay: integer 0–86400 seconds. Schedule/Reconnect share one per-account timer; later requests replace it. ScheduleFolder replaces the same folder timer from the same source. Maximum 100 pending folder timers.
true means local send did not throw, not server acknowledgment, future launch confirmation, or script result. Native code checks Allowed folders. Inspect Launch & status/history.
Multiple accounts
One source, separate folders
Create batch-1, batch-2, batch-3 and allow them in the source profile. Put one account per folder if one account per step is needed.
local session = getgenv().PotassiumSession
assert(session, "Wait for the Potassium bridge before sending timers")
assert(session.ScheduleFolder("batch-1", 30), "First request failed")
assert(session.ScheduleFolder("batch-2", 60), "Second request failed")
assert(session.ScheduleFolder("batch-3", 90), "Third request failed")
Delays start at submission, not completion of the preceding login. Running accounts are skipped. Each recipient uses its own saved game, script, and flags. Requests cannot carry arbitrary script source/paths.
Each running account schedules itself
local Settings = { Order = 2, StepSeconds = 30 }
local session = getgenv().PotassiumSession
assert(session, "Potassium bridge is unavailable")
assert(session.Reconnect(Settings.Order * Settings.StepSeconds), "Request failed")
Use Order 1, 2, 3, etc. Each countdown starts at its own call; without synchronization this is not an exact central queue.
ScheduleFolder does not implement an exact per-account queue with a delay between every account in one folder. It schedules a folder launch. For completion-based profile chains and external HTTP signals, see the workflow guide.
Heartbeat and status
Heartbeat is sent every 15 seconds. Native capability is generated for a specific account/PID/instance; it is not the vault password and requires no manual copying. Default socket: ws://127.0.0.1:8224; POTASSIUMWSPORT can override it. MCP 8225 is separate.
| Status | Meaning |
|---|
| waitingForHeartbeat | Bridge queued for delivery; no report yet |
| loadingReported | Client has not reported a loaded game with Job ID |
| onlineReported | Client reports game:IsLoaded and Job ID; not independent server verification |
| offlineReported | Explicit disconnect or loss of reported online state |
| scriptTimerScheduled | Timer received; later heartbeat may change visible status |
| heartbeatLost | Timeout after a previous heartbeat |
| reconnectRequested | Native recovery request created |
Timeout also covers a missing first heartbeat after delivery. Native launch deadline covers missing game-entry confirmation even if attach fails. This is opt-in restart policy, not proof the process is dead. GUI error events and ErrorPrompt polling depend on runtime access.
Timers are in memory. Manager closure, vault locking, or application exit cancels them. Profile settings persist; one-shot requests do not. Closing the bridge with recovery active may cause heartbeat timeout; use GUI switches or Stop recovery for this run to disable it fully.