Executing the Scheduled Task on Non-Holidays Only

  • Last update: April 24, 2025
  • Overview

    Application Scenario

    You may want a scheduled task to be executed only on non-holidays.

    Implementation Method

    You can call an API to determine whether the current day is a holiday. If it is a non-holiday, the downstream general nodes will run. If it is a holiday, Virtual Node will run, as shown in the following figure.

    1.2.png

    Procedure

    Judging Whether the Current Day Is a Holiday

    API Calling

    1. Create a scheduled task and drag a Data Transformation node onto the page.

    2. Enter the Data Transformation node, add an API Input operator, and call the API https://date.nager.at/api/v3/PublicHolidays/2025/US to retrieve all U.S. holiday information for 2025, as shown in the following figure.

    2.1.1.png

    Parameter Output

    1. Add a Parameter Output operator and configure it to output the date field as a parameter, which can be used in the downstream Conditional Branch node to achieve the effect of executing the task on non-holidays, as shown in the following figure.

    2.1.2.png

    iconNote:
    Click the Parameter Preview button, and the system will automatically fill in Debug Value to facilitate viewing the effect in subsequent nodes. The debug value does not affect the actual running result.

    2. Click Save in the upper right corner.

    Setting the Conditional Branch Node

    1. Add a Conditional Branch node. If the current day is a non-holiday, the downstream nodes will be executed. (The Notification node is used here to facilitate viewing the effect.) If the current day is a holiday, Virtual Node will be executed, as shown in the following figure.

    2.2-1.png

    2. Cinfigure the Conditional Branch node. When the task is executed on a non-holiday, the downstream general nodes will run. When the task is executed on a holiday, Virtual Node will run, as shown in the following figure.

    2.2-2.png

    iconNote:
    ${cyctime} refers to the time for each execution of the scheduled task set in Task Control.
    Setting the Downstream Node

    In this document, the Notification node is used as a downstream general node for demonstration purposes. In practical scenarios, you can replace the Notification node with the node that needs to be executed next as needed.

    The following figure shows the setting page of the Notification node.

    2.3.png

    Effect Display

    1. Click Run in the upper right corner to execute the task. The running result in Log upon successful execution is shown in the following figure.

    2.4-1.png

    2. The notification content is shown in the following figure.

    2.4-2.png

    附件列表


    主题: Data Development - Scheduled Task
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy