Planning for scheduling scripts

After you considered the deployment options, you decide that scheduling is the best option for your script's deployment. Consider the following key points before you schedule your bot.

Important:Starting from IBM RPA 23.0.7, Scheduling scripts is deprecated. Use Scheduling bots instead. For more information, see Deprecated.

Before you begin

  • Read the Getting started section if you are new to IBM RPA development.

  • To see other methods to deploy your scripts, see Deploying scripts.

  • For IBM RPA on premises only:

    • IBM RPA on premises server requires a queue provider such as IBM MQ or Microsoft™ Message Queue (MSMQ) installed and operational to schedule scripts. Check with your server administrator if your server supports one of these queue providers. The recommended message queue provider is IBM MQ.
    • If you are a server administrator, see Installing IBM MQ for instructions about how to install it. You can later change to MSMQ after you install the server.
    • If IBM MQ is not available, see the steps to enable MSMQ in Installing Message Queue (MSMQ) 🡥. You can later change to IBM MQ.
  • Unattended automation
    Scheduled scripts typically do not require human intervention to run since they run at predetermined times, regardless of human availability. Waiting for human assistance can lead to increased idle periods or potential errors.

    When you are developing your script for scheduling, make sure users can't access the host computer while the script is running. If the script automates systems in the foreground, human interaction while the script is operating can affect the script. However, scripts can still use files that the host computer's users create.

  • Operation frequency
    You need to consider the time frame that the script is active. When you schedule scripts, you can set the script to run multiple times in a time period span of multiple weekdays. If you need your script to run multiple times during the same day on different time periods, you need to create multiple schedules.

  • The scheduler options
    Scheduled scripts run individually. Scheduling scripts enables you to set scripts to run on a set time or multiple times during a time interval. You can also configure the schedule to happen on the set time or time interval during predefined weekdays. Scheduling does not consider date.

  • Valid session and unlocking the machine
    For the schedule to work, the host machine needs to be running and able to connect to the IBM RPA server. When the script is up to start, the computer must be connected to the IBM RPA server so the Bot Agent on the host machine can download the script and run it. Before it runs, the Bot Agent needs to unlock the machine to create a user session or attach itself to an active user session. Scripts need to unlock the machine by using the credentials that are configured to them in IBM RPA Control Center, otherwise, the script tries to attach itself to an available user session. This results in failures if the script can't find an active user session. Scripts running on virtual machines unattended always need to unlock the machine.

  • Licenses needed
    To schedule scripts, you need available Bot Runtime licenses in the host computer. In the IBM RPA SaaS offering, you purchase Bot Runtime licenses; in the IBM RPA on premises and IBM RPA on Red Hat® OpenShift® Container Platform offerings, you can define how many Bot Runtime licenses the computers have. Extra charges can be applied considering runtime usage. You can verify your available Bot Runtimes by navigating to the configuration page (https://localhost:8099/web/en-US/ibmrpaclient) in the host computer.

    Attention: Both orchestrating and scheduling scripts are asynchronous deployments; launching scripts, chatbots, or triggering scripts by using the client-side API are synchronous deployments. If you set a synchronous and an asynchronous deployment to run at the same time, one of them might fail to run.
  • User privileges for the script
    The script that unlocks the computer acquires the privileges of the user credential set to the schedule, while other scripts have the privileges of the user session that it attaches to.

  • IBM RPA Vault's system mode
    You need to use the system vault mode when scheduling scripts. In this case, the script automatically retrieves the credentials from the IBM RPA Vault by decrypting the credential by using its private key. For more information about differences between user Vault and system Vault, see the What is the IBM RPA Vault? topic. For more on IBM RPA Vault credentials and how to use the IBM RPA Vault, see the Using the IBM RPA Vault topic.