This application discloses a task-based
resource scheduling method, electronic device, and computer-readable medium. The method includes inserting to-be-scheduled jobs into a startup
queue corresponding to the
unique identifier of the task to which they belong, the
user identifier to which they belong, and the
group identifier to which they belong, in a first-in-first-out order based on their creation time. The method also determines the
concurrency upper limit of each startup
queue and schedules the jobs that are ranked first in the startup
queue and whose number is equal to the
concurrency upper limit into a running state. The running jobs in each startup queue are inserted into multiple gear queues based on their job priority and the task priority of their tasks. Different gear queues correspond to different task priority intervals, and the job priority is determined based on the task priority of the task to which the job belongs, the
user role to which the job belongs, and the device role to which the job belongs. The method also schedules the lifecycle status and resource occupancy status of jobs in multiple gear queues based on the job priority and a pre-configured task-binding
resource policy. This method improves
system stability and user experience.