in reply to run system command continuously

Is that "Ms anyone" or "Mr. anyone" that you expect to provide a solution?

In either case, I hope that individual can understand your question(s). I certainly can't.

Please clarify... with, for example, comprehensible pseudo-code and a small sample of the content of index.ndx (properly formatted, as per Markup in the Monastery and the instructions around the text-entry box) inside <c>...</c> tags.