Merge pull request #1182 from learning-unlimited/dbmail_cron_lock

Add file lock for dbmail_cron.(cherry picked from commit f20284b34203c04bb10774e1d46d8da8137fb911)
Merge pull request #1206 from learning-unlimited/dbmail_cron_lock_backport

Merge pull request #1182 from learning-unlimited/dbmail_cron_lock