If it reverts back to idle straight away that normally means that the flagship is not in a sector with any viable asteroids.
Check the sectors in the fleet panel and then check the closest asteroids and make sure the flagship is in the same sector. I have stopped in a sector surrounded with 10 or more asteroids. I set my fleet to mine and it went to idle. Once I checked, the sector I was in I found there were not actually any asteroids in it!
There is a bug that seems to affect the mining AI. I have had drones sitting in a sector that has asteroids that I am mining manually but they won't mine. Send them a couple of sectors away and they will work fine. It is almost as if the game renders in the asteroid but the AI just cannot detect them so it assumes there are none. Adjacent sectors will work fine.
I have just started on 3 new servers and have brought in three of my different mining fleets and they have all worked perfectly so far, even on a VERY popular and busy server that I was advised does suffer from the random asteroid mining AI bug quite badly.