Scheduling API Tasks - The Schedule API Tasks feature enables you to create a schedule to run a specific version of an API Task at defined schedules. You can choose the run-as-user for the API Task when defining the schedule. Scheduling an API Task allows you to run time-sensitive processes unattended without any manual intervention.

Automation 360

The Schedule API Tasks feature enables you to create a schedule to run a specific version of an API Task at defined schedules. You can choose the run-as-user for the API Task when defining the schedule. Scheduling an API Task allows you to run time-sensitive processes unattended without any manual intervention.

About this task

Note: Scheduling API Tasks in Control Room requires Enterprise Platform license. For more information about supported version for this feature, see Enterprise Platform.

You can schedule available API Tasks to run at specified times. For example, processing a batch of invoices in a .csv file to run on every Wednesday at 5 pm. The Creating schedule option is available in the vertical ellipsis menu of every API Task available in the Public repository. Alternatively, create a schedule using the Create schedule option available in Manage > Scheduled page.

Before you begin

Ensure that you are logged in to the Control Room as administrator or a user with the following permissions:
  • Schedule my bots to run
  • Manage ALL scheduled activity from my Folders permission for the folder in which you check in the specific API Task and any dependencies
  • Run as user for API Tasks. For more information, see Run-as-user for API Task (apitaskrunner).

Procedure

  1. Log in to Control Room.
  2. Select one of the following methods on the left panel to create a schedule:
    • Go to Automation > Public, and click the vertical ellipsis menu of the appropriate API Task that you want to create a schedule and click Schedule API Task.
    • Go to Manage > Scheduled > Create schedule.
    The Create schedule page appears.
  3. Click Choose in the Automation and dependencies section of Create schedule page.
    The Find a file modal appears.
  4. Select the API Task for which you want to schedule and click Choose.
    The Create schedule page updates with other schedule tabs.
  5. Configure the following settings in the Automation and dependencies tab and click Next:
    1. Confirm the selected API Task in Automation file setting.
      If you want to select a different API Task, click Choose and follow the prompts to select a different API Task.
    2. Select the appropriate version of the API Task in Run automation and dependencies using setting.
      The following options are available:
      • Latest version: Schedules the selected API Task and the dependencies using the most recent version.
      • Production label: API Tasks does not support the Production label option.
    If the selected API Task contains any dependencies, the Dependencies section automatically updates the list of dependencies.
  6. Configure the frequency and repetition settings for the selected API Task settings in the Schedule tab based on the following choices:
    OptionDescription
    Run once Select this setting to run the API Task one time and define the time interval. The following settings are available for this setting:
    • Start date: Set the start date for the schedule. The current date is set as the default start date.
    • Start time: Set the start time for the schedule. The system rounds the next half-hour and sets it as the default start time.
    • Time zone: Set the time zone for the schedule. The system sets the time zone of the local device as the default time zone.
    Run repeatedly Select this setting to run the API Task repeatedly and set the dates, repetition interval, and the frequency for the API Task. The following settings are available for this setting:
    • Start date: Set the start date for the schedule. The current date is set as the default start date.
    • End date: Set the end date for the schedule.
    • Start time: Set the start time for the schedule. The system rounds the next half-hour and sets it as the default start time.
    • Time zone: Set the time zone for the schedule. The system sets the time zone of the local device as the default time zone.
    • Repeat every: Set the repetition interval for the schedule. You can set the repetition intervals in minutes or hours.
    • End time: Set the end time for the repetition interval for the schedule.
    • Time zone: Set the time zone for the repetition interval for the schedule.
    • Frequency: Set the frequency of repetition for the schedule. You can set the frequency as follows:
      • Daily: Select the number of days.
      • Weekly: Select the number of weeks and specific days of the week.
      • Monthly: Select a specific day of the selected month or specific weekday occurrence within the selected month. For example, you can configure a schedule to run on the second Thursday of January, May, and September by selecting Second, Thursday, and January, May, and September from the given options.
    Note:
    • The EST, HST or MST time zones are deprecated. See Upcoming feature deprecation.
    • When daylight saving is enabled and if the Start date is scheduled, the date appears in the time zone to which it belongs (not per the user's current time zone). However, Next occurrence appears in the time zone (system time zone of the user) per daylight saving time.

      For example, for a schedule created on 15 March in GMT time zone, the Start date appears as Mar-15th, which belongs to the GMT time zone. Later, when daylight saving is ON and if you edit or view this schedule in the month of August in BST time zone, the next occurrence appears as August which belongs to the BST time zone.

      If you schedule the task to run from 2023-11-23 9:00 AM to 2023-11-30 9:00 AM, with the frequency set as daily, the task executes daily from 2023-11-23 9:00 AM and the last task executes on 2023-11-30 9:00 AM.

  7. Select the Redeploy the schedule again check box to set the Missed schedule setting and click Next.
    The Redeploy the schedule again option automatically deploys the missed schedules when the Control Room restarts. The system adds an audit log entry with Event type as Schedule misfired.
    Note: When you select the Redeploy the schedule again option, ensure that you start the compiler services before restarting the Control Room services to ensure successful deployment.
  8. Configure the Run-as users setting using the following options and click Next:
    1. Select the appropriate users from the Available run-as users table and click the right arrow to add them to the schedule.
      Note: The system generates a user named apitaskrunner and associates it with the AAE_API Task Runner role to establish the run-as user context for API Tasks.
      The selected users appear on the Selected table. If required, you can select any users and click the left arrow to remove them from the schedule.
    2. Select one of the following in Define number of run-as users to use option:
      • All run-as users: Select this option to specify all the users available in the Selected table as run-as users when executing the API Task.
      • Custom number of run-as users: Select this option to provide a certain number of users from the Selected table that you want to use as run-as users.

        For example, if you have 5 users in the Selected table, and you only want to use 3 as run-as users, enter 3. The 3 users listed at the top of the table are used as run-as users when executing the API Task.

  9. Configure the General settings of the schedule using the following options and click Create schedule:
    1. Confirm the auto-generate name or rename the activity name for the schedule in Activity name.
    2. Optional: Add a description for the schedule activity in Description.
    3. Select an appropriate priority for the schedule from Automation priority drop down.
      The system sets Medium as the default automation priority

Results

The schedule created for the selected API Task appears on the Activities table of the Scheduled activities page. The status column of the Activities table displays the status of the schedule.