Add logging to tasks managed by the task scheduler, showing CPU and database usage.