There is an (admittedly small) upside to working on something in small bursts. While there is a huge cost to task switching, a regularly scheduled task that doesn’t last long can be productive. Here’s how:
If the task has a relatively low switching cost — something you know well, or something that doesn’t take long to get setup/back into — the time in between sessions gives you time to think (if only unintentionally) about the task, and the upcoming session. Occasionally, you’ll find that you’ll be surprisingly efficient at that task, having had some time to think about things in interim.
Even if you only have a small amount of time, it can be efficient, on the right task.