Optimized running background tasks