Can I make my dwarves not cancel a process (repeating) just because they don't have the materials? I have guys collecting sand and glassmakers making glass blocks. The idea is that the bags are emptied and made usable for the collectors, and then filled and made usable for the glassmakers. However, unless I have an exact 1:1 timed glassmake:bag fill ratio, one of them will cancel their repeating task if he runs out of free bags or runs out of bags filled with sand, respectively. Is there a way to just keep the process running even if they do run out once in a while?
No, sadly. All you can do is have lots and lots of bags available.
Actually, if you make sure there is a reasonable amount of spare bags, and each glassworks has 5 "job slots" filled with "collect sand" on repeat, with the other 5 filled with whatever you want made on repeat, then as long as no dwarves steal empty bags for other purposes
*, then you should have glass/sand parity and all will be well. Theoretically. It's good to have some spare sand bags and empties on hand in case of slipups either way.
I usually set the 5 collect jobs on repeat and use the job manager to fill the remaining slots with what I actually want made.
* NOTE: taking the empties off to a stockpile counts as "stealing empty bags for other purposes". Don't have your stockpiles accept bags. sandy, or empty. nothing good ever comes of it.