The fly problem is a never-ending part of keeping livestock during the warmer months. The use of fly baits, fly predators and commercially made fly traps can help eliminate some of the fly population. Usually, I purchase several of the commercial "trap and toss" type flytraps and hang them in the trees.
This year, with the price of everything but flies going up, you might want to make your own traps. and one produced the most success. Make the solution in the amount you need in order to fill the number of constructed traps. Fill each bottle to about 1⁄2" from the inverted opening.
Fly Bait Recipe: water, about 1 cup white sugar, some vinegar to keep bees from being attracted, a couple of drops of dish soap and part of a banana peel. There are other recipes for homemade fly bait on the internet, and you can try some variations to see what works best in your area. Using a small bit of raw hamburger in water will work for some species of carrion flies. You can also purchase fly bait liquid and add this and water to your homemade traps if you don't want to mix your own. The flies go in, thinking they have found fly nirvana, but have a hard time finding the opening to escape before they tire and drown.
When the traps are full, remove them and dispose of them properly. Replace the traps as needed. A two-liter bottle will hold a great number of pests that would otherwise be tormenting the livestock. It takes only a few minutes to make a trap.