Question: how far away do you have to be for mobs to spawn in minecraft?
Answer: Mobs only spawn when the player is nearby, within an area of 240×240 blocks, so you'll need to be close to the farm for it to operate.