The Torah commands us “to teach our children diligently, while at home and when travelling, in the evening and in the morning.” This verse refers to the mitzvah of learning Torah, which we are commanded to study whenever we have available time, wherever we are. This is stressed more starkly in Pirkei Avos: ‘One who travels alone and occupies himself with worthless thoughts is risking his life’.
The idea is further reinforced in the words of the Sages, “For he has scorned the words of G-d”, this is someone who could have learned and didn’t. This statement is not referring only to someone who never learned at all, but rather is teaching us that every minute that a person could have learned and didn’t, he should worry lest he be considered someone who scorned G-d. One should not think that since when standing in Divine judgement a person is asked “Did you set aside time to learn Torah?” that setting aside some time is sufficient. On the contrary, learning Torah is one of the mitzvas that have no limits, and the question is posed to someone who had no time to learn, and even so he is still required to set aside some time for learning every day no matter what. Beyond that time, whenever a person has time available he should spend it in learning, even if a different mitzva presents itself, unless that mitzva cannot be done by others.