how do I run a command on an entity every time that entity spawns?

I'm using the pehkui mod to set the scale of an entity but I want that scale to be applied to every one of a specific entity that spawns. how would I do this with a script?

Continue to help post