Tasks are operations that you can create in your application and run them manually or automatically based on a predefined schedule. They can be very useful for automating repetitive actions, like data modifications or sending email and SMS notifications. Tasks are ideal when you want to batch process large volumes of data during off-peak hours. For example, you can aggregate data during the day and process it at night. You can email your past customers who have birthday to make them special offers. In a task management application, you can remind people weekly about the open action items that need their attention.

Note: In terms of functionality, Tasks are very similar to Triggered Actions. The main difference is what triggers them. You build the logic for Tasks the same way you build the logic for Triggered Actions. However, Tasks usually run on a recurring schedule while Triggered Actions run in a response to a data insertion, update, or deletion. For more information, see Triggered Actions.

Creating a task

  1. On the sidebar of your application, click Tasks.

    Note: Tasks are available only in some Caspio plans. For more details, see the current Caspio plans and pricing.

  2. Click New Task and build your task in the task editor.
  3. Click the Cog icon and set the frequency of your task runs.
    • For manual tasks, set the frequency to On Demand and click Apply. For more information, see Running a task manually.
    • For repetitive tasks, perform the following actions:
        1. Set the frequency to a time interval.
        2. Set the time schedule and recurrence.
        3. Click Apply.

  4. Select one or more actions to be part of the task and build the logic of the task. In the left panel, you have categories of visual blocks that you can drag and drop to build your task. These action blocks are constructed using an SQL-like logic builder that supports INSERT, DELETE, and UPDATE constructions, table(s) joining, data grouping and aggregations, email and SMS notifications.
  5. Optional: Test the correctness of your logic by clicking Validate. If there are errors, you must fix them before you can save the task.
  6. Click Save and name your task.
  7. Save your task. If you want to enable the task immediately, click Save & Enable.

Running a task manually

If you need, you can run a task yourself when it is enabled. Running manually a task that has a predefined schedule, does not affect its schedule.

  1. On the sidebar of your application, click Tasks.
  2. Hover over the task that you want to run.
  3. Click Run Now. When the task is complete, the time of the last run changes.

Examples of tasks

Example 1: A birthday email

A daily task runs in the morning, identifies who among your customers has a birthday that day, and sends customized emails with birthday wishes and special offers.

Example 2: An event reminder

An event management application emails all event registrants a week before the event to remind them about the upcoming event.