Can I set a certain range in A * Pathfinding?

I am new to Unity . I made a Enemy Pathfinding AI with A * Pathfinding but I want it to only work within a certain range. If the target is in that range only then the Pathfinding would work and if not then it will just stop. Help? Thanks!

Use Physics.CheckSphere