- Print
- DarkLight
- PDF
The Delay node in Corezoid allows you to introduce a time delay in your workflow, specifying how long a task should wait before progressing to the next node. This functionality offers greater control over the flow and timing of your processes (see Picture 1).
Picture 1. Delay node task flow
Moreover, the Delay node provides the capability to schedule the execution of a task for a specific time which you can specify in seconds, minutes, hours, and days. For instance, you can configure the node to release a task precisely at 7 p.m., allowing for the automation of time-dependent actions.
Node Settings
Alert if the number of tasks in the node queue reaches the following number - If this option is selected, a new condition will be created within the node. It will allow you to monitor whether the number of tasks in the node exceeds the specified threshold.
Maximum interval, for which the task stays in the node before being forwarded - the amount of time a task is allowed to be in this node. Can be specified in seconds, minutes, hours, or days. It can also be specified as a unixtime function. This value must be at least 30 seconds.
If your application requires time limits shorter than 30 seconds, we recommend contacting us to explore our on-premise solutions.
Working with Unixtime
The $.unixtime(%y-%m-%d %h:%i:%s) function is a powerful tool for working with dates and times in your Corezoid Processes. When using this function, leaving the variables as-is will return the current system time.
To specify a time, simply replace any of the variables with the desired values. For example, $.unixtime(%y-%m-%d %13:%00:%00) would specify 1 PM of the current day.
You can manipulate unixtime values just like any other variable. For instance, $.unixtime(%y-%m-%d %h:%i+30:%s) would specify a time that is 30 minutes in the future.
It's important to note that system time is in GMT, and you may need to adjust for different time zones by adding or subtracting hours. For example, to switch to Pacific Standard Time (PST), you would need to add 8 hours, like this: $.unixtime(%y-%m-%d %h+8:%i:%s).
Examples
Delay a task by an x amount of time
Using the Delay node, you can introduce delays between the execution of certain actions in your workflow. For example, you may want to send an email to your customers 30 minutes after they sign up for your service.
To specify the length of a delay, you can simply enter an integer value into the "Maximum interval" field of the Delay node (see Picture 2).
Picture 2. Delaying a task for a time interval specified with an integer number
Alternatively, you can also use unixtime to specify the delay. Simply add the desired delay time within the unixtime function (see Picture 3).
Picture 3. Delaying a task for a time interval specified with unixtime
Scheduling
You may want to delay a task until a specific point in time. For instance, you may want to schedule an email campaign to start on February 19 at 6 PM.
To achieve this, you can specify the desired date and time within the unixtime function in the "Maximum interval" field of the Delay node (see Picture 4).
Picture 4. Delaying a task until a time point specified with unixtime
Example of a dynamic timer for each task
See the example, where:
date
variable is converted to unixtime to be used in the Delay logic (the format isDD.MM.YYYY hh:mm:ss
)offset_GMT
variable is used to adjust the value to a Corezoid server time zone.
Error handling & troubleshooting
When an error occurs in the node, the following fields are added to the initial task depending on the error and node type:
Error parameter name | Parameter description |
---|---|
__conveyor_node_type_return_type_error__ | Error type: hardware (system error), software (error in a node logic/settings) |
__conveyor_node_type_return_type_tag__ | Error tag |
__conveyor_node_type_return_type_description__ | Error description in human-readable language. Can be static or dynamic |
Problem | Cause | Solution |
---|---|---|
Task was not released from the node at the expected time | The specified unixtime is in the past | Move the date to the future. Make sure the specified timezone is correct |
The unixtime formatting is incorrect | Fix unixtime formatting |