Scheduler
Within the Spider it is possible to schedule tasks ahead. These are tasks that run at a specific dates and repeat daily, weekly or monthly. The tasks are part of a process which contains one or more process Steps.
A Scheduled task can consist of one or more underlying tasks, so-called batch requests. In the examples we give some examples of tasks with 1 underlying task and with multiple tasks.
Overview
From the menu, navigate to More > Scheduler > Scheduled Requests
for an overview of scheduled tasks.
Schedule Configurations
The overview page shows the Scheduled configurations and in the second tab the actual planned requests.
Add Scheduler
Click on Add new
to create a new scheduler.
Process Information
- Name: Enter a short clear subject for the task
- Process: Select the process that has to run.
-
ProcessStep: If the task may/should start from a certain processstep.
-
ParentID: (optional) If you want to make a reference to a previous request, you can enter that Id here.
- Body: If a task depends on content then it is added here. This can range from a string to a JSON or XML body.
Info
Example: Suppose a request has gone wrong and may not be offered again until next week. Then a (one-off) scheduled task can be made of this. The variables can be taken from the previous request and the ParentID used as a reference.
Variabeles
From version 1.8.0, you can include variables in the request. Especially if the task needs to run from a second process step, it can be easy to include variables.
A variable consists of a key and value. Click Add new variable to add one or more.
Then click in the key and Value field to assign the variables. An Enter confirms the selection.
Similarly, the variable can also be deleted by clicking Remove selected variable.
Timing
Enter the start and end time here. Although there is no check on the end time, it should be filled. So 15min later then the start-time is fine.
Return Pattern
Three types can be chosen:
Daily
Weekly
Monthly
Return Pattern Range
- Start date : Enter the first date from when the request is allowed to start.
- End date : The end date of the task. If this task should run every day for the whole month, the end date can be filled in here. OR
- Ends after: x number of times. How often should this request be repeated?
Now click on Save
. The scheduled item is created.
Scheduled items
The way to check which requests belong to the Scheduler is to click on the ScheduleConfigurationId.
You will be automaticly be pointed to the second tab Scheduled requests
and see the requests that belong to the Scheduled item.
As you can see in the overview, the task is scheduled for multiple days and this is committed to a single ScheduleConfigurationId. So this task has been added to Spider as a batch request (recurring) task.
Search filters
In the first and second tab you can also use the filter options to search for Scheduled items and the requests that belong to the item.
On the Scheduled requests
tab you can filter on the Configuration item and/or search for the subject (processName)
You can also check the requests that are planned for today, tomorrow, etc.
Edit Scheduler
Tip
To modify a task you need to take the following into account:
- If a task creates multiple tasks (batch) then all these tasks will be set to Failed and new tasks will be created in their place.
- If there is MtInformation linked to this process then the modified (failed) tasks will be incorrectly marked as errors in the process. To prevent this the old requests can be given a different status (RFC).
This can be accomplished by going to More > Change requests > Failed requests
. Search for the requestId and edit it. Then set a description in the remark section and save it. So it won't be marked als failed in the Mtinfo.
See also Changed Requests
In case you need to edit a scheduler you can click on the edit button
Delete Scheduler
A task can be deleted. Click on the delete
icon. A popup will appear. As of version 1.7.0, a comment must now be entered. The underlying requests then automatically go to RFC (Request Failed Changed) status and are no longer marked as errors.
The Schedule Configuration will be deleted. You can still check in the Second tab which requests are set to a fail state.
As you can see below, all scheduled requests (since version 1.7.0) are marked as Request Failed Changed
. Requests that have already been processed are not modified.
The deleted requests can also be found in Requests > Changed
.
Examples
In the examples, we assume for a moment that the task:
- From 08:00 AM the robot may pick up the task. We do need to fill in the end time, but it is not checked for.
- Name: ImportUrenSheets
- Process: Hours Processing
Information | Value |
---|---|
Name | ImportUrenSheets |
Process | Urenververwerking |
Body | string |
Timing | Value |
---|---|
Start time | 08:00 |
End Time | 08:15 |
UseCase 1
This task must be picked up every day, but may be rotated a maximum of 8 times. This task may be picked up tomorrow.
Return Pattern | Value |
---|---|
Daily | |
Every | 1 DAYS |
Return Pattern Range | Value |
---|---|
Start Date | 03-02-2022 |
Ends After | 8 Times |
The task is automatically scheduled for the next 8 days.
UseCase 2
This one may run once. Next month on Wednesday.
Return Pattern | Value | Value 2 |
---|---|---|
Daily | ||
Every | 1 DAYS |
Return Pattern Range | Value |
---|---|
Start Date | 02-03-2022 |
Ends After | 1 Times |
The task is scheduled for the next month on Wednesday.
UseCase 3
This task should run every 1st day of the month, for the next 3 months.
Return Pattern | Value | Value 2 |
---|---|---|
Monthly | ||
Day | 1 | Of each 1 Months |
Return Pattern Range | Value |
---|---|
Start Date | 02-03-2022 |
Ends After | 3 Times |
The task is automatically scheduled for the next 3 months.
UseCase 4
This task should run weekly on Thursdays. The end date of the task is June 1 this year. The task will then be scheduled for the last time on May 26.
Return Pattern | Value | Value 2 |
---|---|---|
Weekly | ||
Every | 1 Weeks | On Thursday |
Return Pattern Range | Value |
---|---|
Start Date | 02-03-2022 |
Ends After | 3 Times |
The task will be scheduled each week through May 26
Edit scheduled task
We are going to modify the task we created in UseCase 1. Instead of running every day, we want to run it only on weekdays.
Now this can be done in 2 ways.
- Checking the Todo requests for the 2 tasks that would run on Saturday and Sunday and removing them.
However, you want the task to run 8 times only on weekdays. The other 2 tasks could be scheduled separately, or you could modify the main task. And we'll show that here.
Delete a task
It can also happen that of the entire batch only the task of, say, tomorrow does not need to be picked up. You do not have to change the main task then, but can solve this by "dropping" the task.
Navigate in the menu to Requests > Todo
and "drop" the task that should not be picked up. Click Ok in the popup to confirm.
To have the task not count against the Mtinfo as failed processing (as the task was not picked up), go to Information > More > Change requests > Failed Requests
. There you change the task and add a comment and save it.
The task is now no longer seen as Failed request, but as a Changed request. And those are not counted in the MtInfo.
Navigate to Requests > Changed
to find the task there.
Delete Schedule
As an example, we use the task in UseCase 2.
Go to More > Scheduler > Maintain
. We see the task listed there.
Now click on the ScheduleConfiguration Id for the task. You will then automatically see what underlying tasks exist for this schedule. Remember the ScheduleConfigurationId.
We now see the task created in this schedule. A RequestId is automatically created for the task. You can also see that it is associated with ScheduleConfigurationId 5.
Then go back to More > Scheduler > Maintain
. Now click on the cross next to the task.
A warning popup will appear. Click Ok to confirm that we want to delete the schedule.
We see the message at the top right that it succeeded.
The schedule has now been removed. The underlying request has been moved to Change Requests and we are going to modify it. This is because we don't want this task to be visible in the MtInfo if it hasn't run and therefore isn't wrong.
Navigate to More > Change Requests > Failed Requests
. There we see the task we just deleted.
Now click on the pencil icon behind the respective task to add a comment.
Enter a clear comment and click on Save.
The task is then no longer visible in the overview. It will be moved to Changed Requests. From the menu, navigate to Requests > Changed
to find the task there again.
In this way, all tasks that were under the main task can be modified.