A container may include a secure chamber to hold a medication, a lockable lid that covers an opening of the secure chamber, a dispensing device, and one or more processors. The container may receive prescription information indicating a frequency to dispense the medication and indicating a dose of the medication to dispense at a dispense time. The container may determine the dispense time based on the frequency to dispense the medication. The dispense time may be a time to dispense a dose of the medication. The container may cause the dispensing device to dispense the dose of the medication from the secure chamber at the dispense time.