do not run domain jobs if not needed

cherry picked from master rev#a1e288a75a27566733f646bd26139c35fe24091c
[merge]