how to check if automation should be done