Backport cron database changes

Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>