Overview of zfoo scheduler
mainThe zfoo-scheduler is a time-based task scheduling bus. It uses the Spring-provided interpreter pattern for parsing Cron expressions.
Key characteristics:
- Time Adjustment Sensitivity: Adjusting the local machine's time (forward or backward) will trigger task scheduling, which is useful for local development.
- Single-Threaded Execution: The scheduler uses a single
ScheduledExecutorServicethread that executes atriggerPerSecond()method once every second to iterate through schedulers. - Performance: It uses Javassist bytecode enhancement technology to dynamically proxy scheduled tasks, avoiding reflection and minimizing performance overhead.
Important Usage Note: Because the scheduler uses only a single thread, users must avoid performing time-consuming or blocking operations directly within the scheduled task. If a task requires heavy processing, it should be handed off to a separate thread pool.