Skip to content

Shut down when a render finishes

A rule is “when ⟨something happens⟩, ⟨do one thing⟩”, saved on the computer. It runs there even when your phone is offline. This guide covers everything a rule can do; for a walk-through, see Your first rule.

Trigger Parameter Fires when
A program closes (process_ends) name: the program’s name, 1 to 260 characters, no / or \, no control or invisible characters, no spaces around it The program is missing from two checks in a row (checks run every 5 seconds)
The GPU goes idle (gpu_idle) minutes: 1 to 240 The busiest GPU has stayed under 5 percent use for that many minutes
  • Program names are exact. On Windows the case and a trailing .exe do not matter. The program must be running when you add the rule, otherwise the computer answers “cannot find that program”.
  • GPU idle needs an NVIDIA GPU with its driver (Tealhand reads it through NVML). Without one, the computer refuses the rule (“does not allow that”). When the computer slept or the reading failed for more than three checks, the quiet stretch starts over.
Then What happens
shutdown A 60-second notice, then shut down
sleep A 60-second notice, then sleep
notify A notification only: no notice, nothing else

shutdown and sleep rules need your fingerprint or PIN when you set them. notify rules do not. A rule can only do one of these three things: it cannot run a program, and it cannot create another rule.

When you add a shutdown or sleep rule, Tealhand Host first asks the power helper who is signed in. It refuses the rule at once when another user is signed in (the phone says “Someone else is signed in on” the computer’s name) or when the helper cannot be used, instead of saving a rule that would be dropped later. Then it checks that the watched program is running, or that a GPU can be read.

When a shutdown or sleep rule fires, and again at the end of its notice, Tealhand Host checks:

  • Another user signed in: refused. The computer will not shut down under someone else’s session.
  • Remote control off: a rule set from a phone is refused. A rule set on the computer itself still runs.
  • The phone that set it is no longer connected: the rule is cancelled.
  • The work came back during the notice (the program runs again, or the GPU is busy): the notice ends and the rule waits again from the start. A reading that fails counts as “came back”: no shutdown on a guess.
  • The notice was missed (the computer slept or hung, more than 30 seconds past the deadline): cancelled.

Only one notice runs at a time. A second rule that fires meanwhile waits for the next check.

State Meaning
Waiting Watching for its trigger
Firing The 60-second notice is running, with its deadline
Done It did its thing, at a given time
Refused It fired but was refused: another user signed in, the program was not found, or remote control is off
Cancelled Cancelled by you, by a restart during its notice, or because the phone that set it left the device list

Rules are saved in rules.bin and come back when Tealhand Host starts again, with two safety rules:

  • A rule that was counting down its notice when Tealhand Host stopped is cancelled, never resumed.
  • The other rules are not armed until their work is seen again: a program rule waits until the program runs, a GPU rule until the GPU is busy. So a reboot in the middle of a render never shuts the computer down a minute after boot. If the work never comes back, the rule waits; cancel it from the list.
  • At most 32 rules per computer, active and finished together. Finished rules are dropped to make room; when all 32 are active, a new one is refused as busy.
  • Removing a phone from the device list cancels the rules it set.
  • Forgetting the connected phone on the computer wipes all rules.

With a planner, sentences like these are meant to become a rule.add card. The model can still pick wrongly, which is why the card shows exactly what it picked:

  • “Shut down the studio PC when blender finishes” → process_ends blender.exe, then shutdown.
  • “Put the computer to sleep when the GPU has been idle for 15 minutes” → gpu_idle 15, then sleep.
  • “Tell me when render.exe closes” → process_ends render.exe, then notify.

The planner only proposes. The phone checks the proposal again and shows the card; nothing happens until you confirm.