Sign Up

Event Basics

Introduction to Events

Events in Twidget are fundamental building blocks that allow you to automate tasks on a schedule. These events trigger at specified times or at recurring intervals, executing a predefined list of commands without the need for any inputs or outputs.

-

Types of Scheduled Events

  1. One-Time Events: These events are scheduled to occur at a specific date and time.

  2. Recurring Events: These events trigger at regular intervals, e.g., every hour, day, week, etc.

How Events Work

  • Schedule: Define when the event should trigger. This could be a specific date and time or a recurring interval.

  • Commands List: Specify the sequence of commands that the event should execute. These commands are run in the order they are listed.

Creating an Event

  1. Define the Schedule: Set the exact time or recurring interval for the event.

  2. Add Commands: List the commands to be executed by the event.

Characteristics of Events

  • No Inputs/Outputs: Events do not require any inputs to trigger and they do not produce outputs. They are based purely on the schedule and execute the commands listed.

Examples of Scheduled Events

Example 1: Morning Report Generation

Description: An event that generates a daily report every morning at 7 AM.

Schedule: Every day at 07:00 AM

Commands:

  1. Fetch latest data from the database.

  2. Compile the data into a report.

  3. Send the report via email to the management team.

Example 2: Hourly System Health Check

Description: An event that performs a health check on the system every hour.

Schedule: Every hour

Commands:

  1. Run system diagnostics.

  2. Log the result of the diagnostics.

  3. If an error is found, send an alert to the support team.

Example 3: Weekly Backup

Description: An event that backs up the system data every Sunday night at 11 PM.

Schedule: Every Sunday at 11:00 PM

Commands:

  1. Initiate data backup

  2. Verify backup integrity

  3. Notify IT team

Conclusion

Creating scheduled events in Twidget allows you to automate routine tasks efficiently. By defining a precise schedule and listing the necessary commands, you can ensure that critical processes are executed timely without manual intervention.

Related Topics