Improve cron jobs for multiple portals (issue #1727)