Skip to content

Process Scheduler

Scheduler (Process Scheduler) is Heptora’s time-based scheduling system that allows you to execute automations at exactly the moment you need. Whether once, recurrently, or following complex patterns, the scheduler ensures your processes run when and how you need them.

Heptora’s scheduler eliminates the need for manual intervention to start processes, allowing your automations to function completely autonomously according to the schedule you define.

  • ⏰ Flexible Scheduling: Cron, calendar, intervals, custom recurrences
  • 📅 Smart Calendar: Considers holidays, weekends, and business days
  • 🔄 Automatic Retries: Configurable retry policies in case of failures
  • ⚡ Priority Management: Control execution order when there are multiple tasks
  • 🚦 Concurrency Control: Limit simultaneous executions to avoid overloads
  • 🕐 Execution Windows: Define allowed and prohibited time slots
  • 📊 Monitoring: Complete history of executions and results

For advanced users, cron expressions offer maximum flexibility:

* * * * * *
│ │ │ │ │ │
│ │ │ │ │ └─ Day of week (0-7, where 0 and 7 are Sunday)
│ │ │ │ └─── Month (1-12)
│ │ │ └───── Day of month (1-31)
│ │ └─────── Hour (0-23)
│ └───────── Minute (0-59)
└─────────── Second (0-59, optional)
# Every day at 9:00 AM
0 9 * * *
# Every Monday at 8:30 AM
30 8 * * 1
# Every hour, at minute 15
15 * * * *
# Every 15 minutes
*/15 * * * *
# Monday through Friday at 6:00 PM
0 18 * * 1-5
# First day of each month at 00:00
0 0 1 * *
# Every 30 minutes, from 9 AM to 5 PM, Monday to Friday
*/30 9-17 * * 1-5
  • *: Any value (all)
  • ,: List of values (1,3,5)
  • -: Range of values (1-5)
  • /: Increment (*/15 = every 15)
  • ?: No specific value (useful for day of month/week)
# Every 2 hours, from 8 AM to 6 PM, Monday to Friday
0 8-18/2 * * 1-5
# At 00:00 and 12:00, every day
0 0,12 * * *
# Every 10 minutes, on odd hours
*/10 1,3,5,7,9,11,13,15,17,19,21,23 * * *
# Last day of each month at 23:59
59 23 28-31 * * [ $(date -d tomorrow +\%d) -eq 1 ]
# Quarter hours (00, 15, 30, 45) from 9 AM to 5 PM
0,15,30,45 9-17 * * *

Visual interface to schedule without needing to know cron syntax:

Execute a process at an exact moment:

Type: Specific date
Date: 2024-12-25
Time: 08:00
Time zone: America/New_York
Repeat: No

Use cases:

  • Specific quarterly report sending
  • Campaign launch on specific date
  • Scheduled maintenance task
  • Accounting period closure

Schedule relative to current moment:

Type: Relative
From: Now
In: 2 hours
Exact: Yes

Use cases:

  • Reminder after creating a task
  • Automatic follow-up after X days
  • Escalation of unresolved tickets

Repetitive patterns for periodic tasks:

Type: Daily
Every: 1 day
Time: 09:00
Time zone: America/New_York
End: Never (or specify end date)

Variations:

  • Every X days: Every 2 days, every 3 days, etc.
  • Business days: Monday through Friday only
  • Specific days: Monday, Wednesday, and Friday only

Use cases:

  • Daily data backup
  • Synchronization with external systems
  • Daily report generation
  • System monitoring
Type: Weekly
Every: 1 week
Days: Monday, Wednesday, Friday
Time: 14:30
Time zone: America/New_York

Configurations:

  • Every X weeks: Every 2 weeks, biweekly, monthly
  • Multiple days: Any combination of days
  • Different schedules: One schedule per day

Use cases:

  • Weekly reports
  • Weekly data cleanup
  • Automated meetings
  • Payroll processing
Type: Monthly
Every: 1 month
Day: 1 (first day of month)
Time: 00:00
Time zone: America/New_York

Options:

  • Fixed day: Day 1, 15, last day, etc.
  • Relative day: First Monday, last Friday, etc.
  • Multiple days: Day 1 and 15 of month

Use cases:

  • Monthly billing
  • Accounting closure
  • Monthly reports
  • Bank reconciliations
Type: Annual
Every: 1 year
Month: January
Day: 1
Time: 00:00
Time zone: America/New_York

Use cases:

  • License renewal
  • Annual reports
  • Scheduled audits
  • Annual maintenance

Execution based on elapsed time:

Type: Interval
Every: 30 minutes
Start: 09:00
End: 18:00
Days: Monday to Friday

Common configurations:

  • Every 5 minutes: Intensive monitoring
  • Every 15 minutes: Frequent synchronization
  • Every 30 minutes: Regular processing
  • Every hour: Periodic updates

Use cases:

  • System monitoring
  • Near real-time data synchronization
  • Queue processing
  • Health checks
Type: Interval
Every: 2 hours
Start: 08:00
End: 20:00

Use cases:

  • Incremental backup
  • Cache updates
  • Periodic synchronization
  • Intermediate reports

Intelligent system that considers the business calendar:

Calendar: United States (New York)
Includes:
- Federal holidays
- State holidays (New York)
- Local holidays (NYC)
Considers:
- Saturdays and Sundays as non-business days
- Observed holidays
- Long weekends (optional)

You can define your own calendar:

Calendar: Custom
Business days: Monday to Friday
Custom holidays:
- 2024-01-01: New Year's Day
- 2024-12-25: Christmas
- 2024-12-26: Boxing Day (optional)

What to do when execution falls on a holiday:

Skip:

If holiday: Skip
Description: Does not execute that day

Previous business day:

If holiday: Previous day
Description: Execute on last business day before

Next business day:

If holiday: Next day
Description: Execute on next business day

Execute anyway:

If holiday: Execute
Description: Executes even on holiday

Payroll processing:

Schedule: Last business day of month
Time: 00:00
If holiday: Previous day
Calendar: United States

Bank reconciliation:

Schedule: Business days
Time: 08:00
If holiday: Next day
Calendar: US + bank holidays

Report sending:

Schedule: Business Mondays
Time: 09:00
If holiday: Next business day
Calendar: Company (custom)

Define when a process can and cannot execute:

Allowed windows:
- Monday to Friday: 08:00 - 20:00
- Saturdays: 09:00 - 14:00
- Sundays: Not allowed

Behavior:

  • If scheduled execution falls outside window, it’s delayed to the start of the next window
  • Useful for resource-intensive processes
  • Avoids executions during maintenance hours
Prohibited windows:
- Maintenance: Sundays 02:00 - 06:00
- Backup: Every day 23:00 - 00:30
- Peak hours: Monday to Friday 12:00 - 14:00

Use cases:

  • Avoid executions during database backup
  • Don’t execute during system peak hours
  • Respect maintenance windows
Process: ERP Synchronization
Schedule: Every 30 minutes
Allowed windows:
- Monday to Friday: 08:00 - 20:00
Prohibited windows:
- Monday to Friday: 12:00 - 14:00 (peak hours)
- Every day: 23:00 - 00:30 (backup)
If outside window: Wait for next available window

Control how many process instances can run simultaneously:

Maximum concurrency: 1
Behavior if limit reached: Queue
Maximum queue: 10

Behavior options:

Queue:

Behavior: Queue
Description: Waits for current execution to finish
Maximum queue: 10 (maximum pending executions)

Skip:

Behavior: Skip
Description: Skips this execution if another is in progress
Log: Logs skipped execution

Terminate previous:

Behavior: Terminate previous
Description: Cancels current execution and starts new one
Warning: May leave processes incomplete

Execute in parallel:

Behavior: Execute parallel
Maximum: 5 simultaneous instances
Description: Allows multiple executions up to limit

Read-only process:

Type: Data query
Concurrency: 10
Justification: No conflicts, read-only

Process with DB writes:

Type: Record updates
Concurrency: 1
Behavior: Queue
Justification: Avoid race conditions

Report generation process:

Type: PDF generation
Concurrency: 3
Justification: Balance between performance and resources

Email sending process:

Type: Bulk sending
Concurrency: 5
Behavior: Queue
Maximum queue: 20
Justification: Respect email provider limits

Configure what to do when an execution fails:

Retries: 3
Interval: 5 minutes
Backoff: None

Behavior:

  1. First execution fails
  2. Wait 5 minutes → Retry 1
  3. Fails → Wait 5 minutes → Retry 2
  4. Fails → Wait 5 minutes → Retry 3
  5. Fails → Mark as definitively failed
Retries: 5
Initial interval: 1 minute
Backoff: Exponential
Factor: 2
Maximum: 30 minutes

Behavior:

  1. Fails → Wait 1 min → Retry 1
  2. Fails → Wait 2 min → Retry 2
  3. Fails → Wait 4 min → Retry 3
  4. Fails → Wait 8 min → Retry 4
  5. Fails → Wait 16 min → Retry 5
  6. Fails → Mark as failed

Advantages:

  • Gives external system time to recover
  • Doesn’t overload immediately after failure
  • More efficient for temporary problems
Retries: 4
Initial interval: 5 minutes
Backoff: Linear
Increment: 5 minutes

Behavior:

  1. Fails → Wait 5 min → Retry 1
  2. Fails → Wait 10 min → Retry 2
  3. Fails → Wait 15 min → Retry 3
  4. Fails → Wait 20 min → Retry 4

Only retry certain error types:

Retries: 3
Interval: 5 minutes
Retry only if:
- Timeout
- Connection error
- Temporary server error (503)
Don't retry if:
- Authentication error (401)
- Resource not found (404)
- Data validation error
Retries: 3
Notify:
First failure: No
Failure after retries: Yes
Recipients:
- admin@company.com
- ops-team@company.com
Include:
- Error log
- Input data
- Failure timestamps

Control execution order when there are multiple tasks in queue:

Available priorities:
- Critical (5): Immediate execution
- High (4): Preference over normal
- Normal (3): Standard priority
- Low (2): When resources are available
- Very low (1): Only during low load times
Process: Monthly billing
Schedule: Last day of month, 00:00
Priority: Critical (5)
Justification: Critical financial process
Process: Old log cleanup
Schedule: Sundays, 03:00
Priority: Very low (1)
Justification: Non-urgent maintenance task

Priority can adjust based on conditions:

Process: Order processing
Base priority: Normal (3)
Adjustments:
- If urgent order: High (4)
- If VIP order: Critical (5)
- If standard order: Normal (3)
- If stock replenishment: Low (2)

Increases priority if a task has been waiting long:

Aging enabled: Yes
Increment: +1 every 30 minutes
Maximum: Critical (5)

Example:

  • T+0min: Task enters with Low priority (2)
  • T+30min: If still waiting, rises to Normal (3)
  • T+60min: If still waiting, rises to High (4)
  • T+90min: If still waiting, rises to Critical (5)

This prevents low-priority tasks from never executing (starvation).

FIFO with priority:

Strategy: FIFO with priority
Description: |
- First execute tasks with higher priority
- Within same priority, FIFO (First In, First Out)

Round-robin with priority:

Strategy: Round-robin with priority
Description: |
- Alternates between different processes
- Respects priorities but avoids monopolization

Fair:

Strategy: Fair scheduling
Description: |
- Guarantees CPU time to all processes
- Even low-priority ones eventually execute

View all past executions:

Available filters:
- Date range
- Status (successful, failed, in progress)
- Specific process
- Duration (more/less than X time)
- User who scheduled

Information for each execution:

  • Start and end timestamps
  • Duration
  • Final status
  • Complete logs
  • Input and output data
  • Errors if any
  • Number of retries

Overview of scheduler status:

Visible metrics:

  • Scheduled executions (next 24h)
  • Executions in progress
  • Success rate (last 7/30 days)
  • Processes with most failures
  • Average execution time per process
  • Current queue (tasks waiting)

Configure automatic notifications:

Execution failure:

Type: Failure
Condition: Process fails after all retries
Recipients: admin@company.com
Channel: Email + Slack
Urgency: High

Delays:

Type: Delay
Condition: Process takes more than 150% of expected time
Recipients: ops@company.com
Channel: Email
Urgency: Medium

Success after retry:

Type: Recovery
Condition: Process fails but then succeeds
Recipients: dev-team@company.com
Channel: Email (daily summary)
Urgency: Low

Queue saturation:

Type: Saturation
Condition: More than 20 processes in queue
Recipients: admin@company.com
Channel: SMS + Email
Urgency: Critical

Although the scheduler is automatic, sometimes you need manual control:

Action: Pause
Process: ERP Synchronization
Reason: External system maintenance
Duration: Until manual reactivation

The process won’t execute according to its schedule until reactivated.

Action: Execute immediately
Process: Report generation
Ignore: Execution windows
Priority: Critical

Executes process immediately, without waiting for next scheduled execution.

Action: Advance next execution
Process: Incremental backup
New time: Now + 5 minutes
Reason: Important data changes
Action: Cancel
Execution: ID #12345 (queued)
Reason: Incorrect input data

Removes an execution that hasn’t started yet.

Action: Stop
Execution: ID #12346 (in progress)
Type: Graceful (wait for safe point)
Timeout: 2 minutes
If timeout: Force stop

Stops an execution that’s already running.

Requirements:

  • Execute on last business day of month
  • At 23:00 to not interfere with daily work
  • If fails, retry up to 3 times
  • Critical priority
  • Don’t execute on bank holidays

Configuration:

Name: Monthly billing generation
Schedule: Cron
Expression: 0 23 * * * # Daily at 23:00
Day filter: Last business day of month
Calendar: United States + bank holidays
If holiday: Previous day
Priority: Critical (5)
Concurrency: 1
Retries: 3
Retry interval: 30 minutes
Notifications:
Success: finance@company.com
Failure: finance@company.com + admin@company.com
Channel: Email + SMS (for failures)

Requirements:

  • Every 15 minutes Monday through Friday
  • Only during business hours (8:00 - 20:00)
  • Maximum 1 simultaneous execution
  • If fails, retry with exponential backoff

Configuration:

Name: ERP Synchronization
Schedule: Interval
Every: 15 minutes
Allowed window:
Monday to Friday: 08:00 - 20:00
Priority: Normal (3)
Concurrency: 1
Behavior if busy: Queue
Maximum queue: 10
Retries: 5
Backoff: Exponential (1min, 2min, 4min, 8min, 16min)
Notifications:
Definitive failure: it@company.com

Requirements:

  • Every day at 02:00
  • Low priority (don’t interfere with other tasks)
  • Don’t retry if fails (next day’s backup will compensate)
  • Notify only in case of failure

Configuration:

Name: Complete database backup
Schedule: Cron
Expression: 0 2 * * * # Daily at 02:00
Priority: Low (2)
Concurrency: 1
Retries: 0
Timeout: 2 hours
Notifications:
Failure: admin@company.com + backup-monitoring@company.com
Channel: Email
Success: Don't notify

Requirements:

  • Every 5 minutes, 24/7
  • Up to 5 simultaneous executions
  • Priority by order type
  • Retry temporary errors

Configuration:

Name: Order processing
Schedule: Interval
Every: 5 minutes
24/7: Yes
Priority: Dynamic
VIP order: Critical (5)
Urgent order: High (4)
Normal order: Normal (3)
Concurrency: 5
Behavior if limit: Queue
Maximum queue: 50
Retries: 3
Backoff: Linear (2min, 4min, 6min)
Retry only:
- Timeout
- Connection error
- Error 503
Notifications:
Failure: sales@company.com (summary every 4 hours)

Requirements:

  • Every 2 minutes, 24/7
  • Immediate execution (high priority)
  • No retries (next check will detect problem)
  • Immediate failure notification

Configuration:

Name: Critical systems health check
Schedule: Interval
Every: 2 minutes
24/7: Yes
Priority: High (4)
Concurrency: 10 (parallel checks)
Retries: 0
Timeout: 30 seconds
Notifications:
Failure: oncall@company.com
Channel: SMS + PagerDuty
Immediate: Yes

Requirements:

  • Every Monday at 08:00
  • If Monday is holiday, next Tuesday
  • Allow up to 30 minutes to complete
  • Don’t retry automatically (manually review if fails)

Configuration:

Name: Weekly sales report
Schedule: Weekly
Day: Monday
Time: 08:00
Calendar: United States
If holiday: Next business day
Priority: Normal (3)
Concurrency: 1
Timeout: 30 minutes
Retries: 0
Notifications:
Success: management@company.com + sales@company.com
Failure: it@company.com
Include: PDF report attachment (if success)
# BAD: Possible conflicts
Process A: Every 10 minutes
Process B: Every 15 minutes
Both access: Same database without locks
# GOOD: Coordinated
Process A: Every 10 minutes
Concurrency: 1
Uses: DB lock
Process B: Every 15 minutes
Concurrency: 1
Uses: Same DB lock

For multiple similar processes, stagger them:

# BAD: All at once
Backup DB1: 02:00
Backup DB2: 02:00
Backup DB3: 02:00
Problem: Massive simultaneous load
# GOOD: Staggered
Backup DB1: 02:00
Backup DB2: 02:20
Backup DB3: 02:40
Benefit: Distributed load
# Process with dependency
Name: Generate sales report
Depends on: ERP synchronization
Schedule: 30 minutes after synchronization
Or
Verify: Data updated before starting
# Lightweight process (read-only)
DB queries: Concurrency 10-20
# Medium process (reads + light writes)
Updates: Concurrency 3-5
# Heavy process (intensive operations)
Report generation: Concurrency 1-2
# Very heavy process (massive exports)
Full export: Concurrency 1
# Timeout based on historical data
Process: ERP Synchronization
Average duration: 5 minutes
Historical maximum duration: 12 minutes
Configured timeout: 15 minutes (125% of maximum)
# Heavy processes: outside business hours
Full backup: 02:00 - 06:00
Reindexing: 03:00 - 05:00
# Business processes: within hours
Billing: 08:00 - 20:00
Order shipping: 09:00 - 19:00
# Critical processes: 24/7 with throttling
Monitoring: 24/7, every 5 min
Emergency processing: 24/7, immediate
Transient errors (retry):
- Network timeout
- Service temporarily unavailable (503)
- Rate limit (429) - wait and retry
- DB deadlock - retry
Permanent errors (don't retry):
- Invalid credentials (401)
- Resource not found (404)
- Invalid input data
- Business rule violation
When failing, log:
- Exact timestamp
- Input data
- System state before failure
- Complete stack trace
- Relevant variables
- Retry attempts made
# Don't saturate with notifications
First failure: Silent log
Second failure: Log + low priority alert
Third failure: Email to team
Definitive failure: Email + SMS to responsible party
# Aggregate notifications
Instead of: 100 emails (one per failure)
Better: 1 email per hour with failure summary
Key metrics:
- Success rate per process (target: >95%)
- Average execution duration (detect degradation)
- Queue size (alert if >50% capacity)
- Time in queue (alert if >5 minutes)
- Distribution of failures by error type
# Don't wait for disaster
Early warning:
- If 3 failures in 1 hour: Investigate
- If duration >150% of average: Review
- If queue >50% capacity: Scale resources
- If success rate <90%: Urgent analysis
Weekly:
- Review processes that failed most
- Analyze duration trends
- Verify schedules are still valid
Monthly:
- Optimize slow processes
- Review alerts and adjust thresholds
- Document changes made

Symptoms: Scheduled process never executes

Possible causes:

  • Incorrect cron expression
  • Execution windows too restrictive
  • Process paused manually
  • Robot not running
  • Incorrect time zone

Solutions:

  1. Validate cron expression at crontab.guru
  2. Verify available execution windows exist
  3. Confirm process is not paused
  4. Ensure robot is active
  5. Review time zone configuration

Symptoms: Multiple instances of same process running simultaneously

Possible causes:

  • Concurrency limit not configured or too high
  • Process takes longer than expected
  • “Queue” behavior not configured

Solutions:

# Corrective configuration
Concurrency: 1
Behavior if busy: Queue
Timeout: [realistic time based on history]

Symptoms: Process fails consistently

Possible causes:

  • Problem with external system
  • Expired/invalid credentials
  • Incorrect input data
  • Bug in process itself
  • Insufficient resources

Solutions:

  1. Review detailed failure logs
  2. Verify connectivity with external systems
  3. Confirm valid credentials
  4. Execute manually with test data
  5. Increase resources if needed (memory, CPU)
  6. Contact support if problem persists

Symptoms: Many processes waiting in queue

Possible causes:

  • Too many schedules for available resources
  • Processes take longer than expected
  • Concurrency limit too low
  • Insufficient robot resources

Solutions:

  1. Review process duration metrics
  2. Optimize slow processes
  3. Increase concurrency limit (if applicable)
  4. Scale robot resources
  5. Redistribute schedules (stagger times)
  6. Consider adding additional robot

Symptoms: Process doesn’t retry after failure

Possible causes:

  • Retries configured to 0
  • Error type not configurable for retry
  • Timeout too short, each retry also fails due to timeout

Solutions:

# Verify retry configuration
Retries: 3 (not 0)
Interval: Long enough
Backoff: Exponential (to give time for recovery)
Retry only if: [list of transient errors]
Timeout: Realistic + buffer

Can I schedule a process to execute only once?

Section titled “Can I schedule a process to execute only once?”

Yes, use the “Specific date” option without recurrence:

Type: Specific date
Date: 2024-12-25
Time: 10:00
Repeat: No

What happens if the robot is off when a process should execute?

Section titled “What happens if the robot is off when a process should execute?”

It depends on your configuration:

  • Catch-up enabled: When turned on, executes missed executions
  • Catch-up disabled: Skips missed executions, continues with next scheduled

Can I schedule processes with different parameters?

Section titled “Can I schedule processes with different parameters?”

Yes, each schedule can include specific parameters:

Schedule 1:
Time: 09:00
Parameters: {type: "incremental"}
Schedule 2:
Time: 02:00
Parameters: {type: "full"}

How do I know if a scheduled process failed?

Section titled “How do I know if a scheduled process failed?”

Configure notifications:

Notifications:
Failure: your-email@company.com
Channel: Email + [Slack/Teams/SMS]

Additionally, check the scheduler dashboard which shows all executions and their statuses.

Yes, from the interface:

  1. Select the scheduled process
  2. Click “Pause”
  3. When you want to reactivate it, click “Resume”

There’s no technical limit, but consider:

  • Available robot resources
  • Possible overlaps
  • Execution windows

As reference, a standard robot can comfortably manage 50-100 active schedules.

Does the scheduler work with the robot in offline mode?

Section titled “Does the scheduler work with the robot in offline mode?”

Yes, the scheduler works locally on the robot. However:

  • Initial configuration requires connection
  • Email/SMS notifications require connection
  • If process accesses external systems, they must be accessible

If this guide didn’t solve your problem or you found an error in the documentation:

  • Technical support: help@heptora.com
  • Describe the schedule you’re trying to configure
  • Include the cron expression or current configuration
  • Mention expected vs. observed behavior
  • Attach logs if process is failing

Our team will help you configure the scheduler optimally for your needs.