Skip to content

πŸ“„ 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_DEBUG Event enables detailed logging in debug mode, allowing operators to observe task dependencies, event processing, and execution details in real time.

πŸ”— πŸ’» CLI

Disable Debug

  • DISABLE_DEBUG Event returns logging to standard info mode, which limits output to essential messages.

πŸ”— πŸ’» CLI

Refresh Calendar

  • REFRESH_CALENDAR Event reloads all holiday and blackout calendars from the database and updates scheduler data structures.
    πŸ“Œ Example: If a task follows the US_HOLIDAYS calendar and a new holiday is added, the task will be automatically skipped on that day.

πŸ”— πŸ’» CLI


πŸ“‹ Task Events

Refresh Task Definition

  • REFRESH_TASK_DEFINITION Event 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_DEFINITION Event updates a task group when its composition or rules change.

πŸ”— πŸ’» CLI

Enable Task

  • ENABLE_TASK Event activates a task that was inactive (disabled) at scheduler startup, loads its definition, and creates a live schedule for it.

πŸ”— πŸ’» CLI

Disable Task

  • DISABLE_TASK Event deactivates a currently scheduled task, removing it from the near-future run queue.

πŸ”— πŸ’» CLI

Freeze Task

  • FREEZE_TASK Event 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_TASK Event 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_TASK Event immediately triggers a task regardless of its schedule or dependency status.

πŸ”— πŸ’» CLI

Modify Task Status

  • MODIFY_TASK_STATUS Event 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_TASK Event 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.

Next Steps