Scheduler Configuration

Overview

The Scheduler feature enables you to configure Digital Employees to execute tasks automatically at specified times using cron-based scheduling. This is ideal for recurring tasks, automated reports, periodic checks, and time-based workflows.

Currently we utilize AIP Scheduled Runarrow-up-right feature to manage these workflows.

circle-info

Note: Schedules are only available for remote runs (deployed Digital Employees). Local runs do not support scheduled execution.

Key Concepts

What is a Scheduler?

A scheduler allows your Digital Employee to run tasks automatically based on time-based triggers. Each schedule consists of:

  • Schedule Configuration: Defines when the task should run (using cron syntax)

  • Input: The message or instruction to execute when the schedule triggers

Benefits

  • Automation: Execute tasks without manual intervention

  • Consistency: Ensure tasks run at predictable times

  • Efficiency: Free up human resources for higher-value work

  • Reliability: Never miss scheduled tasks or reminders

Configuration

Basic Components

Schedules are configured using two main classes:

  1. ScheduleConfig: Defines the timing using cron-like parameters

  2. ScheduleItemConfig: Combines the schedule with the input to execute

Schedule Configuration Parameters

The ScheduleConfig class uses cron-style parameters:

Reference to GLAIP Python SDKarrow-up-right.

Cron Syntax Guide

Field
Values
Special Characters
Examples

minute

0-59

* (every), - (range), , (list)

0, */15, 0,30

hour

0-23

* (every), - (range), , (list)

8, 9-17, 8,12,18

day_of_month

1-31

* (every), - (range), , (list)

1, 1-15, 1,15

month

1-12

* (every), - (range), , (list)

*, 1-6, 1,7

day_of_week

0-6

* (every), - (range), , (list)

0-4, 0,6, *

Note: Day of week starts with Monday (0) and ends with Sunday (6).

Complete Example

Step 1: Import Required Components

Step 2: Create Digital Employee Identity

Step 3: Configure Schedule

Step 4: Create Schedule Item

Step 5: Create and Deploy Digital Employee

Step 6: Verify Schedules (Optional)

Step 7: Monitor Schedule Runs (Optional)

Common Use Cases

Daily Morning Report

Send a daily report every weekday at 9 AM:

Hourly Data Check

Check data every hour during business hours:

Weekly Summary

Generate a weekly summary every Friday at 5 PM:

Monthly Reminder

Send a reminder on the first day of each month:

Every 15 Minutes

Run a task every 15 minutes:

Best Practices

1. Use Descriptive Inputs

Provide clear, actionable instructions in the schedule input:

2. Consider Time Zones

Be aware of the time zone used by your deployment:

3. Avoid Overlapping Schedules

Ensure schedules don't conflict or create excessive load:

4. Test Schedule Timing

Verify your cron expressions produce the expected schedule:

5. Monitor Schedule Execution

Regularly check schedule runs to ensure they're executing as expected:

6. Use Multiple Schedules Strategically

Group related schedules in a single Digital Employee:

Advanced Configuration

Dynamic Schedule Inputs

Use detailed inputs to provide context:

Combining with Other Features

Schedules work seamlessly with other Digital Employee features:

Troubleshooting

Schedule Not Triggering

Problem: Schedule was created but tasks are not running.

Solution:

  • Verify the Digital Employee is deployed: digital_employee.deploy()

  • Check the cron expression is valid: schedule.to_cron_string()

  • Confirm the schedule exists: agent.schedule.list()

  • Check for failed runs: agent.schedule.list_runs(schedule_id)

Incorrect Timing

Problem: Schedule runs at unexpected times.

Solution:

  • Verify time zone settings

  • Double-check cron parameters (especially day_of_week where 0=Monday)

  • Test with to_cron_string() to see the actual cron expression

  • Review the next_run_time field in the schedule object

Schedule Runs Failed

Problem: Schedule triggers but execution fails.

Solution:

  • Check run details: run.get_result() for error messages

  • Verify the input instruction is clear and actionable

  • Ensure required tools/MCPs are configured and accessible

  • Review Digital Employee logs for detailed error information

Multiple Schedules Conflict

Problem: Multiple schedules running simultaneously cause issues.

Solution:

  • Stagger schedule times by adjusting minute/hour values

  • Consider if schedules can be combined into a single task

  • Monitor system resources and adjust frequency if needed

API Reference

ScheduleConfig

ScheduleItemConfig

DigitalEmployee with Schedules

Managing Schedules via Agent

Examples in Repository

For complete working examples, see:

Last updated