Simplify cron job and improve handling of edge cases (upload)