A little more detail:
Your line may look something like this...
SPDWY 0 62 68
It means that the AI will pit between lap 62 and 68.
Another thing worth noting.... If you set it to SPDWY 0 4 5
the AI will all pit every 4 to 5 laps, but the pitstops will be VERY
quick.... You haven't changed how often they need to change tires.
You have only told them to stop. So they stop.... And put in
a splash of fuel (if even that much - I can't tell) and then
they're gone.
1-3 second pitstops will be the rule for them.
It is a good way to practice pitting with other cars, though. Just
tell the AI to pit every lap or two and go racing with them.