The purpose of this study is to develop an observation program for obtaining effective flat images that are necessary for photometric observation. The development of the program was achieved by improving the existing method for obtaining twilight flat images. The existing method for obtaining twilight flat images acquires flat images by observing the sky light after sunset or light before sunrise. The decision of when to observe flat images at each night is solely dependent on the judgment of an observer, and thus the obtained flat images for particular nights may not be clean. Especially, in the case of the observatories where an automated observation system is in operation, there is a difficulty that an observer should pay attention during sunrise and sunset in order to obtain flat images. In this study, a computer program is developed to improve this inconvenience and to efficiently perform photometric observation in the observatories where an automated observation system is applied. This program can obtain flat images by calculating the time for obtaining flat images automatically and the exposure time using a numerically calculated function. When obtaining twilight flat images at dusk and at dawn, the developed program performs automated observation and provides effective flat images by acquiring appropriate exposure time considering the sunrise and sunset times that vary depending on the day of observation. The code for performing this task was added to Obs Tool II (Yoon et al. 2006), which is the automated observation system of the Chungbuk National University Observatory, and the usefulness of the developed program was examined by performing an actual automated observation. If this program is applied to other observatories where automated observation is in operation, it is expected that stable and highquality flat images could be obtained, which can be used for the pre-processing of photometric observation data.