In the script set the selection on these dates when you run the script.
1. Divide the date using explode()
2. Compare the number of
3. If equal, then output, otherwise not.
All works on the principle when it is necessary - and then done.
If you need to clean up the database once a month, then there is better to use bash.