π EasyTask Scheduler Events Guide¶
The EasyTask Scheduler uses three main types of events to control its behavior and manage tasks effectively:
| π‘ Event Type | π§ Purpose |
|---|---|
| π Scheduler Events | Debugging, holiday calendar refreshes |
| π Task Events | Modifying task scheduling, status, and behavior |
| π‘οΈ Admin Events | Platform updates, configuration adjustments, and license management |
π Scheduler Events¶
Enable Debug¶
ENABLE_DEBUGEvent enables detailed logging in debug mode, allowing operators to observe task dependencies, event processing, and execution details in real time.
π π» CLI
Disable Debug¶
DISABLE_DEBUGEvent returns logging to standard info mode, which limits output to essential messages.
π π» CLI
Refresh Calendar¶
REFRESH_CALENDAREvent reloads all holiday and blackout calendars from the database and updates scheduler data structures.
π Example: If a task follows theUS_HOLIDAYScalendar and a new holiday is added, the task will be automatically skipped on that day.
π π» CLI
π Task Events¶
Refresh Task Definition¶
REFRESH_TASK_DEFINITIONEvent reloads the definition of an individual task after changes in the database, such as updated trigger intervals or modified dependencies.
π Example: If a taskβs interval is changed from hourly to daily, this event must be sent for the change to take effect.
π π» CLI
Refresh Task Group Definition¶
REFRESH_TASK_GROUP_DEFINITIONEvent updates a task group when its composition or rules change.
π π» CLI
Enable Task¶
ENABLE_TASKEvent activates a task that was inactive (disabled) at scheduler startup, loads its definition, and creates a live schedule for it.
π π» CLI
Disable Task¶
DISABLE_TASKEvent deactivates a currently scheduled task, removing it from the near-future run queue.
π π» CLI
Freeze Task¶
FREEZE_TASKEvent temporarily halts a task for the current day, respecting its timezone.
π Example: Freeze a task to skip execution today due to a critical upstream system outage.
π π» CLI
Unfreeze Task¶
UNFREEZE_TASKEvent reactivates a frozen task.
π Note: If unfrozen after the scheduled time or when dependencies are already complete, it may not run until the next trigger or reset.
π π» CLI
Force Run Task¶
FORCE_RUN_TASKEvent immediately triggers a task regardless of its schedule or dependency status.
π π» CLI
Modify Task Status¶
MODIFY_TASK_STATUSEvent enables manual updates to the current status of a task (e.g., FAILED β SUCCESS) to influence downstream flows.
π Example: After a manual fix, marking it SUCCESS will allow dependent tasks to proceed.
π π» CLI
Terminate Task¶
TERMINATE_TASKEvent forcefully stops a running task by sending a termination signal.
π π» CLI
π‘οΈ Admin Events¶
Admin events are used for platform-level operations such as software updates, configuration adjustments, and license management. These events are managed by the EasyTask platform and are not directly injected by users.
β Summary Table¶
| π Category | π₯ Examples |
|---|---|
| π Scheduler Events | ENABLE_DEBUG, DISABLE_DEBUG, REFRESH_CALENDAR, REFRESH_GRAPH |
| π Task Events | REFRESH_TASK_DEFINITION, REFRESH_TASK_GROUP_DEFINITION, ENABLE_TASK, DISABLE_TASK, FREEZE_TASK, UNFREEZE_TASK, FORCE_RUN_TASK, TERMINATE_TASK, MODIFY_TASK_STATUS |
| π‘οΈ Admin Events | Platform updates, configuration adjustments, and license management |
β οΈ Best Practices¶
- Use debug mode only during troubleshooting.
- Always send refresh events after changing definitions in the database.
- Be cautious with force-run and terminate to avoid disrupting production.
π Injecting Events from the Web UI¶
The Scheduler Dashboard (/scheduler) provides quick-action buttons for common events:
- Debug On β
ENABLE_DEBUG - Debug Off β
DISABLE_DEBUG - Calendar β
REFRESH_CALENDAR - Graph β
REFRESH_GRAPH
All other task events (force run, freeze, terminate, etc.) are available through the Events API or CLI.
Frequently Asked Questions¶
Q: What is the difference between FREEZE_TASK and DISABLE_TASK?
A: FREEZE_TASK temporarily halts a task for the current day only (respecting its timezone), while DISABLE_TASK completely deactivates a task, removing it from the run queue until explicitly re-enabled with ENABLE_TASK.
Q: When should I use REFRESH_TASK_DEFINITION?
A: Send a REFRESH_TASK_DEFINITION event after making changes to a task's definition in the database, such as updating trigger intervals, modifying dependencies, or changing command attributes. Without this event, the scheduler will continue using the cached definition.
Q: How do I trigger a task to run immediately outside its schedule?
A: Use the FORCE_RUN_TASK event to immediately trigger a task regardless of its schedule or dependency status. This is useful for testing, remediation, or emergency re-runs. Be cautious in production environments.