From NBC's Pete Williams
Federal agencies are going through the agony of deciding who's essential and who isn't. Those considered non-essential are discovering that no matter how loyal or patriotic they may be, it will be a violation of federal law for them to come to work if there's a shutdown.
Federal law bars the government from spending money for expenses that haven't been approved. That means if a shutdown leaves a government agency without money, employees cannot come to work and thereby create an obligation for the government to pay them.
There's an exception to the law, however, for the "voluntary services" of federal employees who are needed to handle "emergencies involving the safety of human life or the protection of property." This language has tended to be interpreted very broadly -- to cover well over half of all federal employees, who will still be expected to come to work. Once past shutdowns have ended, Congress has paid the essential employees who continued working.
So it boils down to this: In a shutdown, federal employees cannot volunteer to come to work, unless their jobs are considered essential. And if they are essential, their "volunteering" is mandatory.
One other note: While it will be illegal for non-essential personnel to come to work during a shutdown, no one has ever been prosecuted for doing it. However, anyone who tries it -- to demonstrate how essential they think they are -- would be subject to discipline and could even be fired.