Note: There is an updated version of this article, which applies to the next generation of TimeXtender.
In the ODX data sources, you can schedule your tasks to run in a schedule. You can add a scheduled start for all three task options.
There are two methods to do this. When creating the task and adding them afterward.
When you create a task, you go through a wizard and when you reach the last step you will see the following view.
The second method is after the task is created you will have the option to Manage the Task Schedule
In both cases, it gives the same menu, with very minor differences.
Clicking Add... will show you the Scheduler menu.
Your options are the following.
- Set a Start Time (UTC), mark the Run once on this day point and it will choose the current date, but you may change it to some other day. It will then be scheduled to run at that time on that date and not again.
- Set a Start Time (UTC), check the Recurring point, chosen by default, and choose a day, multiple days, or First/Last day of month. There is no limit to how they can be mixed. It will now be executed at the set time on the chosen day/s.
- Using the previous setup, you can set a Repeat by checking the Start task again every, amount of minutes until you hit the end time. You can't set both areas to 00:00, but setting it to start at 00:00 and end at 23:59, while having the Repeat duration set to 1 minute works fine and it will attempt to start a new execution every minute as long as it is not already running.
- The Rerun feature is all new, it is released on 20.10.17. So it is not available in earlier releases. It does not rerun a task from where it failed, but instead from the beginning.
With the above settings, you can set it to do a rerun if a task fails or completes with errors. You can mix the options or choose only one of them. Notice what error type your task fails with and you will know which option to choose, though you can choose both if you want to be certain it reruns the task. You can set how many times you will rerun the task with the Rerun task count field and you can set the delay between these in the Rerun task delay field.
With the following options, you can set up the scheduling in a variety of ways. There is no limit to the number of different schedules you can create, so you can mix them around to run exactly when you want.
When you have created your schedules you can see them in the menu like so.
What I have set it to do is the following. It is for my timezone, remember that the time you choose is always in UTC.
It will run from 06:00 - 14:00, which is 08-16 and it will run every 30 minutes.
Outside "working hours" from 14 until the next day at 5 it will run every hour with rerun task 3 times with a 4-minute delay. This is because you do not expect people to immediately see the issue if they are surveying the executions during the day.
Then I have a specific rule for Saturdays, where it runs every 3 hours between 0 and 21. Again with reruns, but this time there is a bigger delay between them.
Finally, I have made a rule for Sundays and the first last of the month, the last part may be redundant, but I wanted to use all options. Here it runs once at 21 and not otherwise. Again with reruns set up and a delay of 5 minutes.
When you have this, you can always see when the next run of a task is set to start by going into the following View Scheduled Tasks menu.
In there you can see when it is scheduled to run next and for the next couple of days.
Lastly, I have some Best Practices regarding this.
You can only run one task at a time for a data source, so if you want to schedule a full load, a synchronize, or a cleanup task, you will need to make room for it in your schedule. So remember how long it usually takes and schedules it when it is not normally running. If it attempts to start another task while it is running it will be set to pending.
Do not use the rerun feature on scheduled tasks where the repeat is less than the total delay time. So having three reruns with a delay of 3 minutes is by minimum a 12-minute repeat time. In general, do not use it if you run it very regularly. Running it every 5 minutes is very similar to the rerun task method anyway.
0 Comments