How to exclude specific actions in undo , redo chain?

You cannot do that.

Stuff that you run via modeling will always be part of the undo / redo chain.

Give us a few more pointers your use case and we can check if there are better ways of accomplishing what you want.