Time Machine will Work When Logged Out
If you are using an external hard drive, you must be sure the disk does not dismount when logged off. There may be multiple ways to do this, but I use Cocktail to change this setting.
If you use an internal disk for Time Machine, it should run when nobody is logged in.