Changed spawn to setinterval