Fix router warnings when running as CLI

This solved the warnings produced by using cron for background tasks