1. A method of outputting an alarm, the method being performed by an electronic device, the method comprising: receiving a request for setting a schedule, from a first user; storing identification information of the first user and schedule execution information; tracking a second user who is a target of the schedule by using a sensor module of the electronic device; when an alarm execution time included in the schedule execution information comes, moving to an alarm execution site for the schedule using a moving part of the electronic device; and providing an alarm related to the schedule to the second user in a specific manner, wherein the moving part includes at least one motor.