Disclosed are a digital cap for a medicine container, a control method of a mobile device, etc. The digital cap, according to an embodiment of the present invention, comprises: a fastening module connectable to a medicine container, a communication module for receiving, from a mobile device, at least one if medication time and the type of medicine contained within the medicine container a detection module for scanning whether the connected medicine container has been opened or closed an output module for outputting an alarm which restricts medication when the opening and closing is sensed and if the current time is not within the range of the received medication time a controller for transmitting information regarding the opening and closing to the mobile device by controlling the communication module and a battery for supplying power to at least one of the elements.