You can automatically milk your cow using the Industrial Milker. This is available to you for crafting once you reach level 36 in Husbandry. You craft the Industrial Milker in your Animal Bench.
How An Industrial Milker Is Made
The recipe for the Industrial Milker is 1 MEDIUM CHEST, 2 BLUE STICKY GEARS, and 80 IRON INGOTS. Once you place your Industrial Milker on your Island you will need to attach an Industrial chest to it to store the buckets full of milk. Press “F” to open the Industrial milker to place empty buckets into the machine. It can hold 6 buckets at one time. Once the cow has been milked, you can collect the buckets full with milk from the chest. Remember that the cows need to be fed and pet in order to produce milk. If they are happy, they will go stand by the milker. You do not need to do anything other than fill it with empty buckets and collect the milk.