Recurrent Tasks
Process data in near-real-time by triggering jobs based on external events
Introduction
Tilebox Workflows are not only capable of executing jobs once after they are submitted by a user, often also referred to as batch-processing. Instead, it’s also possible to execute jobs in near-real-time, by defining trigger conditions that result in jobs being executed based on external events. This requires no changes in the actual workflow code - the task implementations - at all, instead it’s just a different way of submitting jobs.
Tilebox Workflows currently supports the following trigger conditions:
Cron Triggers
Trigger jobs based on a Cron schedule.
Storage Event Triggers
Trigger jobs after objects are created or modified in a storage location.
Dataset Event Triggers, capable of triggering jobs because of new data points being ingested into a Tilebox dataset, are the next trigger type on the roadmap. Stay tuned for updates.
Recurrent Tasks
To create such a trigger, a special task needs to be defined, that acts as prototype for the tasks that are submitted as part of a job as response to a trigger. Such a task prototype is called a recurrent task.
Since a recurrent task acts as a prototype for an actual task that gets submitted, it has a task identifier,
a version and input parameters just
like any other regular task would. Recurrent tasks additionally also have a special trigger
parameter. It differs for each
instantiation of the recurrent task and contains information about the event that triggered the execution of the task.
Recurrent task client
The Tilebox workflows client provides a sub-client for interacting with recurrent tasks. This client can be
instantiated by calling the recurrent_tasks
method on the client instance.
Listing registered recurrent tasks
To list all registered recurrent tasks, you can use the all
method on the recurrent task client.
Registering a recurrent tasks
To register a recurrent task, the recurrent task client provides create_recurring_...
methods for each trigger type.
Check out the documentation of the individual trigger types for more details.
Overview in the Tilebox Console
Other than using the Tilebox SDKs to list or register recurrent tasks, you can also manage them in the Tilebox Console. Head over to the Workflows tab to check it out.
There, you’ll find a list of all registered recurrent tasks.
Additionally, you’ll be able to register new recurrent tasks or edit/delete existing ones.
Was this page helpful?