don't need to, just specify an online timer(run this command when u are connected) and when u'll disconnect the timer will halted
otherwise u reconnect and want it to work too then do as Raccoon said