I’ve troubleshot this exact issue several times. The problem typically involves a combination of configuration issues across the scheduler, work group, and bot assignment. Here’s the comprehensive solution:
Scheduler Configuration: First, verify your Job Scheduler setup. Navigate to Designer Studio > Integration-Resources > Job Scheduler and locate your RPA batch job. The cron expression for 2 AM daily should be: 0 0 2 * * ?. However, the schedule alone isn’t enough - you need to ensure the job’s activity properly triggers the bot.
The activity that the scheduler calls should not directly start the bot. Instead, it should create work items (cases or assignments) that the bot will pick up. The scheduler should trigger an activity that queries for pending documents and creates a queue of work items. Then configure your bot to monitor this queue and process items as they appear.
Bot Work Group Assignment: This is often the root cause. Go to the RPA Administration portal and check your work group configuration. Your bot needs to be assigned to a work group that has active runtimes available at 2 AM. Verify these settings:
- Work group has at least one runtime configured
- Runtime availability schedule includes your batch window (2 AM - whenever processing completes)
- The runtime machine is actually powered on and connected at 2 AM
- Work group assignment rule matches your bot’s requirements
If your runtime machines are virtual and get shut down overnight for cost savings, this would explain the intermittent failures. Ensure the runtime infrastructure is available 24/7 or adjust your schedule to match when runtimes are guaranteed to be active.
Batch Trigger Validation: The most reliable approach is to use a queue-based trigger rather than a direct schedule trigger. Modify your architecture:
- Scheduler creates a batch work item at 2 AM
- This work item contains the list of documents to process
- Bot monitors a specific queue for batch work items
- When the work item appears, bot picks it up and processes the documents
This decouples the scheduling from the bot execution, making it more reliable. Configure your bot with a “Queue Item” trigger type rather than “Schedule” trigger. The bot continuously monitors the queue (or checks every few minutes) and processes items as they arrive.
To implement this, create a case type for batch processing jobs. Your scheduler activity creates an instance of this case type at 2 AM. Configure your bot to query for cases of this type with status=“Ready for Processing” and process them sequentially.
Additionally, add proper error handling and logging. In your bot configuration, enable detailed logging and configure it to write to a specific log file for batch runs. This will help you diagnose future issues. Also implement a notification mechanism - if the bot fails to start within 15 minutes of the scheduled time, send an alert email to the operations team.
One final critical point: check your Pega system’s background processing node configuration. If background processing is disabled or limited during off-hours, this could prevent the bot trigger from working. Ensure that the node where your RPA runtime is registered has background processing enabled 24/7 or at least during your batch window.