I'm not sure it's working consistently, but here's what I've been able to collect to log off the computer at least twice:
A scheduled task named "Log Off Idle Session", set to run when the user logs on or when the system goes idle, and with Conditions set to run only if idle for 30 minutes...