fix databaselock on curriculum page
(cherry picked from commit f550e18811319619cc29d171d844918e2a344522)
improve cron to make sure we've got errors and we exit cleanly
(cherry picked from commit 0ea400f75e982d418f3cc34e4c13c22a63c42c9b)
fix cron
(cherry picked from commit 988f53c33d079b8f0e10d2dd94ae5f9900488c9f)