Let's assume first that the farm is some distance from your home. You can deduct as a business expense for running the farm, mileage from your main job to the farm if you work both places in the same day, but you don't deduct your mileage from the farm to home, since that's your normal commute. You also don't deduct mileage to and from the farm on days when that is your only work, since that is also your normal commute and is not deductible.
Now, if you also live on the farm, I don't see any way you can deduct mileage to and from your other job since that would be the same as your non-deductible commute for work.
You can, of course, deduct vehicle expenses for getting around on the farm once you are there. If you use your personal vehicle for farming you will need mileage records to prove your farming mileage.