In JavaWeb, does a scheduled task have to occupy a thread all the time?

if I want to scan the database at 1: 00 a. M. every day and do some statistics, does this scheduled task have to occupy a thread all the time?

Mar.09,2021

depending on your implementation, you can either open a single thread or schedule it through a common thread pool (so that threads are not monopolized). If you use Quartz, it already encapsulates the thread pool at the bottom.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b329f0-2ab72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b329f0-2ab72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?