Cmd While Best Practices

What would be the best-practice for a While loop (or any loop) that you want to execute when Asterisk starts?

I have a While loop that runs in an extension and I currently manually run it every time I start Asterisk. In addition to the initial question I’m wondering if it must reside where it is and what other options might be available.

FYI & FWIW I tried searching on:
while - no results??
cmd while - returns primarily hits on "cmd"
while loop - returns primarily hits on “loop” unrelated to coding.

I am also familiar with cmd While voip-info documentation

1st post! And thank you in advance!

Can you give more details as to what you are trying to do?

Asterisk doesn’t execute any dialplan when it starts up, it only executes dialplan when it’s processing a call.