How many more times?....the Military spending is clearly marked "discretionary"....look up the word.
That's not what discretionary and mandatory mean. Discretionary just means congress may, or may not, pass a bill to spend x dollars on x in a given year ... or over several years. Defense spending comes in there. Congress passed the omnibus spending bill funding a pay increase and various ships, aircraft, vehicles, and military operations in various places around the world. Congress didn't have to do that, but it did.
Here's What the Military Gets in $1.3 Trillion Omnibus Spending Bill
There's also spending on entitlement programs, like soc sec medicare Medicaid etc. That is mandated spending because congress passed laws, and potuses signed them, in years past that set out criteria for individuals to be eligible for govt largesse, and anyone meeting the criteria has to get the largesse or they can sue to force the gummit to pay. Mandatory spending and interest on the debt are non-negotiable, unless congress votes to change entitlement programs or we default on the debt
The legality, or illegality, of Trump's latest tweets about spending military spending for his wall comes down to he cannot unilaterally decide to not spend money allocated to a specific provision now that he signed the bill and made a law. That is, he can't decide to not make the new aircraft carrier and spend the money on the wall.
On the other hand, the Army Corp of Engineers is funded and it's missions are not specifically set forth in the law. The executive branch controls how troops are deployed. Although, if we didn't have enough Army engineers in Syria.... it wouldn't be as good.