I found notes in includes/session.php
PHP Code:
// if this line is removed (say to be replaced by a cron job, you will need to change all of the
'online'
// status indicators as they use $userinfo['lastactivity'] to determine if a user is online which
relies
// on this to be updated in real time.
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . "
WHERE userid = $bbuserinfo[userid]
", 'lastvisit');
Maybe cron job code already exists, but where it is ?