The task was originally executed at 1 am every day from Monday to Friday. After checking the log, I found that it was executed at 20:00 on Sunday. Find out the possible reasons. The server is a single-core CPU.
Supplement: In my scheduled task class There are two scheduled tasks AB. Task A is executed at 1 o'clock from Monday to Friday (@Scheduled(cron = "0 0 1 ? MON-FRI")), and task B is executed at 3 o'clock every day (@Scheduled(cron = " 0 0 3 ? *")), check the log and find that from Monday to Friday, task A is executed first and then task B, that is, B is executed without waiting until 3 o'clock; when it is on Saturday and Sunday Task B was executed at 3 o'clock at that time, but task A was executed at 20 o'clock on Sunday. . .
I guess you did not specify the pool size of the scheduled task, so by default all schedules share one thread. You need to specify the pool size of the schedule
xml
bean
Addition:
Sharing a thread will cause serious problems. If task A is not executed within 2 hours, the execution time of task B will be delayed or even not executed.