Animals at nighttime

In Stardew Valley, you are supposed to pet your animals in the morning, make sure they have food (hay), and then open their door so they can go outside (i...