Task Scheduling
The Task Scheduling view (Main Menu
/ Admin
/ Task Scheduling
) provides the necessary tools to group tasks together and execute those groups, once or repeatedly, based on a timer.
Task Groups
A Task Group is a named container for Tasks. The most common form of tasks are Import Tasks and Consolidation Tasks. A single Task Group can contain several different kinds of tasks. When the group is running, those tasks will be executed together in an all-or-nothing fashion: if one task reports a critical failure (for example, a Data Source being unreachable) the entire group is canceled and rolled back, undoing any modifications performed by previous tasks.
The Task order within a group is fixed and determined by the Txture server:
- Asset Importers always run first
- Followed by User Importers
- Followed by Link Importers
- Followed by Property Importers
- Consolidations always run last
You can add tasks to your Task Group by clicking on the button:
Scheduling Triggers
A Task Group can also have a Scheduling Trigger attached. Triggers come in different shapes - you can select the desired type of trigger from the Schedule drop-down menu:
- Once: Fires exactly once, at the specified date and time.
- Daily: Fires once per day, at the specified time. You can configure a start date, and optionally how many days to skip in between executions.
- Weekly: Fires on a weekly basis, at specified week days. You can configure a start date, and optionally how many weeks to skip in between executions.
- Monthly: Fires on a monthly basis, at specified days. You can configure a start date, and optionally how many months to skip in between executions.
- Cron Expression: For users familiar with the Cron utility, you can enter a Cron Expression consisting of 5 parts. The trigger will fire every time the Cron Expression is met. Tools such as Crontab Guru are useful for constructing such expressions.
After configuring your trigger, make sure that the Activate Scheduling checkbox is ticked, and Save your Task Group to activate the scheduling process.
Error Notifications
For each Task Group, you can assign a user to be notified via email if the task execution fails. Failures can especially occur if there are problems with the data source from which the importer is importing. Make sure the user has an email address assigned. You can check this in the admin's Manual User Management view.
Removing a Group from the Schedule
In order to remove a group from the schedule, simply uncheck the Activate scheduling checkbox and Save your Task Group. Deleting a Task Group by clicking on its button will also remove it from the schedule.
Running a Group immediately
Independent of its trigger or current schedule, you can always execute a group right away by clicking on the Run Now button. This will add a copy of the group to the schedule, to be executed at the next possible point in time. It will have no effect on the trigger or current schedule of the group.
Next Imports
The Next imports panel is located at the bottom of the Task Scheduling view:
This panel lists the next upcoming execution Task Groups. This can occur if the data source an importer is based
Info:
If a Task Group is executed e.g. twice per day, it will still only show up once in the "Next imports" section, showing its next upcoming execution.
The Txture Scheduler
The Txture Scheduler is responsible for executing Task Groups. This is an asynchronous process: the user does not need to wait for a group to complete in order to receive feedback. Also, you do not need to keep the Scheduling UI open; once you activated the scheduling, you can safely close the report and the Txture Scheduler will pick up your tasks in time.
If the task queue becomes too crowded, tasks can be delayed. This can happen either if there are too many tasks which are all running on the same trigger, or if a single task takes a very long time. As only one task is executed in parallel at any point in time, a long-running task can potentially block other task executions.
When a Task Group is delayed, it is waiting in the task queue to be executed. In extreme cases (or on very frequent schedules), it can happen that the trigger of a Task Group fires again while the previous execution is still waiting in the queue. In such cases, those additional runs will be dropped to prevent the task queue from overflowing. In other words, a Task Group execution cannot be added to the task queue if a previous execution is still waiting in the queue.
Best Practices for Task Scheduling
- Execute performance-heavy tasks outside office hours. As triggers can fire at any time without manual intervention, we recommend to schedule most groups during night time.
- Do not schedule more frequently than necessary. Daily schedules are sufficient for most cases.
- Use meaningful Task Group. As a group is executed in an all-or-nothing fashion, avoid grouping unrelated tasks together. Failure of one task will cancel the entire group.
- Use meaningful names for Task Group. This will greatly enhance the readability of the Changelog.