the easiest i can think about would be to have a variable (e.g. spawnTime) to store the new time were you want to spawn.
on start and inside spawn_cube, calculate the time you want to spawn adding randomly 5 to 10 seconds (spawnTime = time.time + system.random(5,10) ) or something like that.