Here's the relevant parts of the anti-deficiency statute:
31 USC § 1341 - Limitations on expending and obligating amounts
(a) (1) An officer or employee of the United States Government or of the District of Columbia government may not— (A) make or authorize an expenditure or obligation exceeding an amount available in an appropriation or fund for the expenditure or obligation; (B) involve either government in a contract or obligation for the payment of money before an appropriation is made unless authorized by law;
31 USC § 1342 - Limitation on voluntary services
An officer or employee of the United States Government or of the District of Columbia government may not accept voluntary services for either government or employ personal services exceeding that authorized by law except for emergencies involving the safety of human life or the protection of property. This section does not apply to a corporation getting amounts to make loans (except paid in capital amounts) without legal liability of the United States Government. As used in this section, the term “emergencies involving the safety of human life or the protection of property” does not include ongoing, regular functions of government the suspension of which would not imminently threaten the safety of human life or the protection of property
The government can spend money already appropriated -- either under permanent "mandatory" appropriations or under some more limited multi-year appropriation -- it can spend money under laws that explicitly allow for spending prior to appropriation (the most prominent of which is the Feed and Forage Act of 1861) and under section 1324 above it can spend money in emergencies that imminently threaten the safety of human life or protection of property. That's it. An executive branch official can't just decide it would save money in the long run to spend a little now and save a lot later. The Anti-Deficiency Act is enforced through criminal penalties of up to two years in prison for each violation.