Is it permitted to take a time-released capsule on Shabbat, which is meant to work after Shabbat? This is especially relevant when a fast, such as Tisha Be’Av, begins on Mosei Shabbat. There are two issues which must be explored.
First, although it is sometimes prohibited to take medicines on Shabbat, the Poskim rule that if a person is healthy, and the pill or capsule is not taken for an illness, but rather, for other reasons, like a vitamin, that is permitted. This is called maachal beri’im, food consumed by healthy people. Therefore, R. Moshe Feinstein, and others believe that there is no prohibition to take pills in this case on Shabbat.
Second, some suggest that this might be considered to be a form of hakhana, i.e., preparing on Shabbat for Mosei Shabbat. Rabbi Shlomo Miller, in his book, Shabbat Shelomo (page 229), writes that this would not be considered to be hachana, as the person does not explicitly say that this is for Mosei Shabbat.
Summary: It is permitted to take a pill or time-released capsule on Shabbat which will ease a fast which begins on Mosei Shabbat.