Scheduler

Along with Triggering Nected rules and workflow via API, you can also schedule rules and workflow to run at periodic intervals.

Imagine segmenting customers automatically, syncing data across databases, or setting dynamic discounts based on time, all scheduled precisely. Similarly, daily reports, anomaly alerts, and much more, all happening automatically on your schedule.

With Nected Rule connected with database, it can run rule over database entries and can take up respective rule action for matching rows, While if Nected Rule is configured with external API as source in input attributes, it will be trigger the external API and can take any action based on value or changes in the response.

This documentation provides a comprehensive guide on how to effectively utilize the Nected Scheduler. It covers the setup process, usage in both test and production environments, managing and monitoring schedules, and addresses limitations and upgrade paths.

Testing the Scheduler in Staging

Testing the scheduler in staging is critical to ensure the rule's schedule operates as expected before deploying it to production. This environment allows you to simulate and validate the timing and execution of rules without affecting the live system. In staging, you can test and fine-tune various scheduling configurations by observing how the system processes the items over the database. This testing phase helps identify and rectify any issues, ensuring the schedule functions flawlessly when it is eventually deployed in production. Here are the steps to test the scheduler in staging:

  1. Using the Test Schedule Feature:

    • Go to the rule settings where you will find the 'Test Schedule' button on the right-hand side (the same place where the 'Create Schedule' button was in Production).

    • Click 'Test Schedule' to simulate the execution of the rule.

  2. Input Test Values:

    • Enter the specific test values, such as identifiers, depending on your rule configuration. For example, input values for 'Loan_amount' and 'cusid' as shown in the screenshot.

    • Click 'Test' to run the simulation.

  3. Review Test Results:

    • View the test results to see the number of rows executed and their outcomes (e.g., success or failure).

    • The results will show how many rows were successful and how many failed, allowing you to make any necessary adjustments.

Limitations

  • Row Limit: The Scheduler in Test Mode processes only the first 10 rows of your data set. This constraint is essential for efficient testing and resource management.

  • Data Handling: Depending on your rule, the Scheduler may automatically fetch certain data from your connected database. Ensure that your database connections are correctly set up for accurate test results.

Cron scheduling is not available for use in staging environments for scheduling but only for testing. It will pick up the top 10 items to run over the database.

Utilizing the Scheduler in Test Mode is a vital step towards ensuring the reliability and accuracy of your rules in the Nected platform. This mode offers a controlled environment for testing, giving users the confidence and assurance needed before proceeding to a production environment.

Creating a Schedule in Production

Creating a schedule in production is the final step after thorough testing in staging. This process involves configuring the rule to run at specified intervals in the production environment, ensuring real-time execution as per the defined schedule. In production, the focus shifts from testing to operational execution, where the schedule needs to be accurate and reliable. Any changes to the cron schedule in production require republishing the rule, emphasizing the importance of getting the configuration right during the staging phase. This step ensures that the rule operates seamlessly, maintaining system integrity and performance.

Here are the specific steps to create the Scheduler for your rule:

Access the Scheduler:

  • Navigate to the rule you want to schedule.

  • Find the 'Scheduler' section on the right-hand side of the rule editor i.e. in the rule's settings.

  • At the top center of the Rule Editor, switch from the 'Staging' environment to the 'Production' environment by selecting the 'Production' tab.

  • Click on 'Create Schedule' to start configuring the schedule.

We will soon be launching direct cron scheduling for workflows, allowing you to invoke workflows via cron without needing a dummy rule.

Configuring Schedule Frequency:

The Nected Scheduler offers various options for scheduling frequency, allowing users to tailor the execution of their rules according to specific needs. These include:

  1. Minutes: Set the rule to execute at specified intervals in minutes. This is suitable for tasks that require frequent checks or updates.

  2. Hours: Schedule the rule for execution on an hourly basis. This option is ideal for daily routines that need to run several times throughout the day.

  3. Daily: Choose a specific time for the rule to run each day. This setting is useful for daily tasks that need to occur at the same time every day.

  4. Weekly: Select specific days of the week for the rule to execute. This option is beneficial for tasks that are required on certain days each week.

  5. Monthly: Schedule the rule to run on selected days each month. This is ideal for monthly routines or checks.

  6. Cron: The Cron scheduling option in Nected is designed for complex scheduling needs. It allows users to define custom schedules using Cron expressions, a powerful and flexible way to specify time and frequency for tasks. Cron expressions are strings of text composed of five fields, representing a time schedule in the following format:

    • Minute (0 - 59): Specifies the minute of the hour for the task to run.

    • Hour (0 - 23): Indicates the hour of the day on a 24-hour clock.

    • Day of the Month (1 - 31): Determines the day of the month the task should execute.

    • Month (1 - 12): Defines the month during which the task runs.

    • Day of the Week (0 - 6): Represents the day of the week, where 0 stands for Sunday, 1 for Monday, and so on.

    Each field can contain specific values, ranges, and special characters like '*' (representing all possible values) and '/' (indicating increments). For instance, a Cron expression '0 12 * * 1' means the task will run at 12:00 PM every Monday.

    This advanced feature caters to intricate scheduling requirements, offering users the ability to precisely control when their rules are executed.

  7. Finalizing the Schedule:

    • After choosing the schedule type and setting the parameters, finalize the schedule by clicking the 'Create Schedule' button.

    • You may also need to input test values, i.e. specific identifiers, depending on your rule configuration.

Editing and Updating Schedules

Once a schedule is created, it can be edited or updated at any time. This is done by selecting the 'Edit Schedule' option, allowing for adjustments in response to changing requirements or conditions.

Limitations:

Cron Limit: In the Production environment, there is a default limit of 500 Cron jobs. If your scheduling needs exceed this limit, an upgrade to a higher plan is necessary.

In production environments, you can only schedule and not test. Any changes to the cron schedule require republishing the rule for the changes to take effect.

Monitoring Schedulers

Effective management and monitoring of schedulers are essential for ensuring their optimal performance in the Nected platform. This section guides you through the tools and methods for overseeing and adjusting your schedulers.

For detailed information on what the Audit Trail is and how it functions, refer to the Nected Audit Trail documentation.

Using the Audit Trail for Monitoring

  1. Accessing the Audit Trail:

    Navigate to the 'Audit Trail' or 'Audit Log' screen within the Nected platform to monitor scheduler activities. This feature provides a comprehensive log of all actions and changes.

  2. Interpreting Audit Log Entries:

    The Audit Log displays a chronological record of scheduler events, including updates and test executions. Each entry details the action taken, the rule involved, and the outcome, allowing for effective tracking and analysis of scheduler performance.

  3. Verifying Scheduler Execution:

    Audit Logs are crucial for confirming the execution of schedulers, showing detailed information about each run. For instance, if a scheduler is set for a 10-row test execution, the log will confirm this, providing transparency and assurance of the scheduler's functionality.

Regular management and monitoring of your schedulers in Nected, facilitated by the Audit Trail and user-friendly management tools, are key to maintaining efficient and reliable automated workflows. Regular reviews of the Audit Logs and updates to scheduler settings ensure that your automated processes remain aligned with your operational needs.

Conclusion

The Nected Scheduler is an essential tool for enhancing workflow efficiency in the Nected platform. It's crucial to utilize the Test Mode for rule validation and regularly monitor the Audit Trail for optimal scheduler performance. Be mindful of the limitations in both Test and Production modes, and consider upgrading your plan as needed. Embracing these practices will ensure smooth and effective operations, maximizing the benefits of the Nected Scheduler.

Last updated