Fix memory issues with cron run.

#752