Design question : is getting value from different datasource based on the certain condition a bad design?

Currently I am modifying an application which has a datasource and multiple configuration based on the server configuration (Staging, production etc). Each of the environment has different configuration such as the cron time and other values related to the application.

Now we have a specific operation conducted by ops team where the content of the file is being modified for specific period of time and will be restored later after the operation is finished.

Currently, that task is a manual task so I was assigned to automate this process. Long short story, my proposal will be to create a gui menu that the user will schedule the operation from front end. Let’s say from 8:00 – 10:00. This schedule will be stored into the DB, this is fine.

My question is for the property file part. Right now, if it is 07:55, we will get data from DB to check if current time is between 08:00 – 10:00. If yes, we will get the value from DB but if we are at 07:55, then we will just read the value from property file, like the existing one. This current time check is a cron job that run every 5 minute.

We are thinking if this is a good design or not that the if condition will decide the value from property file or DB. Should we move the content of the property file to database so we just use DB instead of both DB and property file?. Keep in mind that we have other environment that use the same file but different content. I don’t think a db call every 5 minutes is that big overhead considering the select would be very simple with where clause are the time and environment.

The choices are : 1. Keep using property file 2. Using DB and get rid of the property file.

What would you guys think?