dnd 5e – Can Unseen Servant be used as a contingency?

Unseen servant states (emphasis added):

Once on each of your turns as a bonus action, you can mentally command the servant to move up to 15 feet and interact with an object. The servant can perform simple tasks that a human servant could do, such as fetching things, cleaning, mending, folding clothes, lighting fires, serving food, and pouring wine. Once you give the command, the servant performs the task to the best of its ability until it completes the task, then waits for your next command.

Deciding what a simple task would be is up to the GM.

Saying that following is simple seems reasonable. Pouring a potion in a mouth is no different from pouring wine in a glass, if the mouth’s owner opens it. If the mouth’s owner was unconscious, it is a different matter. But, in any case it was already extensively discussed, if a PC could do that.

If you do rule that the servant can do this, it means that it cannot do anything else in the meantime. The description says that the servant performs the task “until it completes the task”, i.e. it will be occupied with following you until you drop in the ground.

You can still give another command any turn as stated in the spell description but this will override the command of following, since the servant then performs the new command to completion and then waits for another command.