Executing Objects - Recurring
As a developer and object designer you have various possibilities to schedule the execution of objects. This topic provides best practices and suggestions for recursive executions. It also describes the Execute Recurring option in detail.
The Execute Recurring option allows you to execute objects at intervals that are shorter than one day. Objects that are executed using this option are called Runtime Objects. They are only visible on the Task list of the Process Monitoring perspective as long as they are active. Their type is C_PERIOD. As soon as their executions have finished, they are no longer visible unless you use the Include deactivated tasks option when filtering tasks.
This page includes the following:
Recursive Executions Best Practices
You have the following options to schedule the execution of objects:
-
Design Schedule objects.
Schedule objects are containers of tasks that assign those tasks well-structured, predefined intervals in which they will be executed. The minimum period is one day.
For more information, see Defining Schedule Objects.
-
Define recursive executions for an object or task using the Execute > Execute Recurring function.
This option allows you to execute tasks in intervals shorter than a day. You can either specify the intervals when defining the recurring execution or assign them a Period (PERIOD) object.
This topic explains this type of scheduled executions.
Scheduling Executions with the Execute Recurring Function
You can schedule recurring tasks by right-clicking the object and selecting Execution Options > Execute Recurring (see Execution Options). Three types are available:
- Executions in a particular interval
- Executions with a particular time gap in between
- Executions at a particular time
The Execute Recurring command is also available in Client 0. This allows administrators to check when and at which intervals a task will run.
When an object is executed using this function, its corresponding task is displayed in the Process Monitoring perspective as a task of type C_PERIOD. See Cyclical (C_PERIOD) Tasks below.
-
Populate the fields on the Execution object name> as follows:
Period Settings section
-
Load Period Object
Period (PERIOD)objects define when and how often recurring executions should run. If you assign one to a recurring execution, the settings defined in the Period object are loaded into the fields on this dialog. You can leave or modify them as needed for this specific recurring execution.
-
Period Description
Text as defined in the assigned Period object. You can modify it for this definition, if necessary.
Execution Settings section
-
Alias
If specified, the alias is displayed on the Tasks window in the Process Monitoring perspective. Aliases help you identify tasks.
Limits: 200 characters.
Allowed characters: A–Z, 0–9 , $ @ _ - . #
Restrictions: Variables are not allowed.
-
Queue
You can assign a particular Queue for this execution. It can be different to the one in the object definition.
If you leave this field empty, the Queue assigned to the object is used.
-
Time Zone
Relevant if your company has teams across different time zones and common processes that affect them. If your company has defined a Time Zone (TZ) object that this execution should consider, select it here.
Period section
-
Start Date
After selecting the date on which the execution starts you must specify how it ends:
-
End: never
It has no end date. You must stop it manually.
-
End: on
Select the date on which it should end.
-
End: after
Select the number of executions after which it should end.
-
Frequency section
-
Execute: at
Time at which the execution will take place.
-
Execute: in intervals of every
Fixed time intervals.
Limit: 504 hours (21 days).
-
Execute: after the previous run ends plus
Buffer time after the end of the previous run.
Limit : 504 hours (21 days).
-
Allow one overlap
The next scheduled execution starts even if the previous one is still running. I you do not activate this option, the execution is skipped until the next scheduled time.
-
Between
When you choose intervals or consecutive runs, rather than one time of day, you can also define a time window during the day that the object is started.
-
Initial Start Time
Time at which the first execution starts. It is available when the frequency is defined for fixed time intervals or when it is based on a buffer time after the end of the previous execution.
Usually, when you start a recurring execution with one of these frequency types, the first execution starts immediately. However, if you select the Initial Start Time option, the first execution waits for the next regular segment of an hour, based on the interval or buffer value.
Example:
If the interval or buffer is set to 15 minutes, the execution starts on the next quarter of an hour (that is, hh:15, hh:30, hh:45, or hh:00). All executions after this start according to the rest of the frequency settings.
Tip: Use this option in combination with Execute in intervals of every if you want the intervals to start at specific times. For example, the job should be executed in 30-minute intervals and you start the recurring execution at 9:07. The following happens:
-
If you have NOT activated the Initial Start Time option:
The job is executed at 9:07, 9:37, 10:07 and so on.
-
f you have activated the Initial Start Time option:
The job is executed at 9:30 (start at the next half hour), 10:00, 10:30, and so on.
Important! This option has little effect when your executions start after a time buffer following the end of the previous run. The first execution will start at a normal clock-time segment, for example not at 9:07 when you started the recurring execution, but at 9:15. However, the rest of the executions will start based on the actual runtime of each run plus the fixed buffer time. This will naturally result in irregular clock-time starts.
-
Days section
In addition to daily and weekly recurrences, you can also use Calendar Events to schedule the execution. If you know it, type the name of the Calendar Event. Otherwise, expand the combo box and click Select Event from Calendar to search for it.
For more information, see Calendar Events.
-
-
Click Execute.
The task has the same name as the object you have just executed and it displays a container symbol (a blue circle with a white curved arrow) next to its name. This identifies it as a scheduled task.
C_PERIOD stands for period container. As long as they are active, objects executed using this option are displayed as tasks with type C_PERIOD in the Process Monitoring perspective. They have a container symbol that helps recognize them and can have the following status:
- Active: The task is currently running.
- Sleeping: The task is outside the execution cycle.
- Stopped: The execution has been put on hold with the Suspend action.
The period container starts tasks according to the settings specified on the Execution object name> dialog. If it has ended, it waits until all tasks have finished and removes itself from the Tasks window. To see the details on how the tasks have ended, open the Executions lists (see Execution Data), where the following error indicators are provided:
- 0: All tasks ended successfully.
- 1: Some task ended abnormally
- 2: No task ended successfully
The log file of C_PERIOD tasks changes every day when the time frame starts and when the settings are changed. The error indicator is reset when the log file changes.
To have the C_PERIOD tasks displayed, you must adjust the task filter in the Process Monitoring perspective. For more information see Including or Excluding Deactivated Tasks.
Modifying the Recurring Execution Settings
If necessary, you can permanently change the settings of recurring executions as follows:
- In the Tasks list in the Process Monitoring perspective, right-click the task.
- Select Modify Execution.
- Make your changes and execute it again.
This is the same as starting the task anew. Numbers of runs and number of erroneous runs are reset to 0.
Modifying the Frequency
The earliest start time of a task changes when you modify its frequency. Calendar definitions, whether you allow overlaps or not and changes to the time frame also affect its start time.
-
Changing to in intervals of every
- If the last start plus the new interval lie in the future, the task starts at the determined point in time.
- If the last start plus the new interval lie in the past, the task starts immediately.
-
Changing to after the previous run ends plus
- If the task is being processed, the specified time is added to the end of the task which results in a new start.
- If the task is not being processed, the specified time is added to its last end. If the calculated point in time is in the future, the task is scheduled. If the calculated point in time lies in the past, the task starts immediately.
-
Changing to at
- If the time lies in the future, the task starts at this point in time.
- If the specified time lies in the past, the task is processed on the next day.
Temporarily Stopping the Cyclical Execution of a Task
The execution of cyclical tasks can also be stopped temporarily. To do so, right-click it and select
- Suspend to stop the parent task only; in this case, if you are executing a Workflow with this option, the Workflow will be suspended but its child tasks could go active.
- Suspend (recursive) to stop both the parent and its children.
To resume the cyclical execution of a suspended task, right-click it and select Go immediately or Go (recursive).
To stop the execution permanently and remove the C_PERIOD, right-click it and select Quit.
See also:
The following topics provide examples of scheduled tasks: