Truncate ubq_messages table if there are no non-pending tasks. This job is scheduled at ~5AM, consider on this time all pending jobs are already processed