You can set up a simple redstone timer, and use the command block (obtained by "/give insertusernamehere command_block/give @p command_block
) and use the command "/kill @e [type=undesiredmobnamehere]"/kill @e [type=undesiredMobNameHere]
if set on a timer, the mob will die instantly after dyingspawning.