> For the complete documentation index, see [llms.txt](https://docs.aohwv.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aohwv.dev/features/scheduling.md).

# Scheduling

CloudSync allows you to automate identity synchronization through flexible scheduling. This guide covers setting up, managing, and monitoring scheduled sync jobs.

## Accessing the Scheduler

{% stepper %}
{% step %}

#### Sign in

Log in to CloudSync.
{% endstep %}

{% step %}

#### Open Settings

Navigate to **Settings** → **Scheduler** from the sidebar.
{% endstep %}

{% step %}

#### View dashboard

You'll see the schedule dashboard with all configured jobs.
{% endstep %}
{% endstepper %}

## Understanding Sync Types

Before scheduling, understand the available sync types:

| Sync Type            | Description                               | When to Use                           |
| -------------------- | ----------------------------------------- | ------------------------------------- |
| **Full Sync**        | Processes all records from HR system      | Initial setup, after major HR changes |
| **Incremental Sync** | Processes only changed records            | Daily/hourly routine sync             |
| **Delta Sync**       | Uses change tracking from Microsoft Graph | Efficient ongoing sync                |

{% hint style="info" %}
Tip: Full syncs are resource-intensive. Schedule them during off-hours (e.g., 2 AM) to minimize impact.
{% endhint %}

## Creating a Schedule

{% stepper %}
{% step %}

#### Click "New Schedule"

From the Scheduler dashboard, click the **+ New Schedule** button in the top right.
{% endstep %}

{% step %}

#### Configure Basic Settings

| Field         | Description                  | Example           |
| ------------- | ---------------------------- | ----------------- |
| **Name**      | Descriptive name for the job | "Daily User Sync" |
| **Type**      | Sync type to perform         | Incremental Sync  |
| **Source**    | HR system to sync from       | Workday HR        |
| {% endstep %} |                              |                   |

{% step %}

#### Set the Schedule

Choose from preset schedules or create a custom one.

Preset Options:

* Every hour
* Every 6 hours
* Daily at midnight
* Weekly (Sunday at 2 AM)

Custom Schedule:

Use cron expression format for custom schedules:

```
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sun=0)
│ │ │ │ │
* * * * *
```

Common Patterns:

| Pattern       | Cron Expression | Description              |
| ------------- | --------------- | ------------------------ |
| Hourly        | `0 * * * *`     | Every hour at minute 0   |
| Daily 2 AM    | `0 2 * * *`     | Every day at 2:00 AM     |
| Weekdays 8 AM | `0 8 * * 1-5`   | Mon-Fri at 8:00 AM       |
| Weekly Sunday | `0 0 * * 0`     | Every Sunday at midnight |
| {% endstep %} |                 |                          |

{% step %}

#### Configure Options

| Option               | Description                     |
| -------------------- | ------------------------------- |
| **Email on failure** | Send alert if sync fails        |
| **Email summary**    | Send daily summary of all syncs |
| **Retry on failure** | Automatically retry failed jobs |
| **Max retries**      | Number of retry attempts (1-5)  |
| {% endstep %}        |                                 |

{% step %}

#### Save and Enable

* Click **Save Schedule**
* Toggle the **Enabled** switch to activate
  {% endstep %}
  {% endstepper %}

## Managing Schedules

### Viewing Schedule Status

The Scheduler dashboard shows:

* ✅ **Active** - Schedule is running as configured
* ⏸️ **Paused** - Manually paused by admin
* ⚠️ **Warning** - Recent job had warnings
* ❌ **Failed** - Last run failed

### Editing a Schedule

1. Click the schedule name or the **Edit** (pencil) icon
2. Make changes
3. Click **Save Changes**

{% hint style="info" %}
Note: Changes take effect from the next scheduled run.
{% endhint %}

### Pausing and Resuming

To pause:

1. Click the three-dot menu (⋮) on the schedule row
2. Select **Pause Schedule**

To resume:

1. Click the three-dot menu (⋮)
2. Select **Resume Schedule**

### Running Manually

Need to sync immediately without waiting for the schedule?

1. Click the three-dot menu (⋮)
2. Select **Run Now**
3. Confirm the action

The job starts immediately and runs in addition to the regular schedule.

### Deleting a Schedule

1. Click the three-dot menu (⋮)
2. Select **Delete Schedule**
3. Type the schedule name to confirm
4. Click **Delete**

{% hint style="danger" %}
Warning: This action cannot be undone. Consider pausing instead of deleting.
{% endhint %}

## Monitoring Scheduled Jobs

### Job History

View past executions from the schedule detail page:

| Column        | Description                 |
| ------------- | --------------------------- |
| **Started**   | When the job began          |
| **Duration**  | How long it took            |
| **Status**    | Success, Warning, or Failed |
| **Processed** | Number of records synced    |
| **Errors**    | Count of errors (if any)    |

Click any row to see detailed logs.

### Setting Up Alerts

Configure notifications for important events:

1. Go to **Settings** → **Notifications**
2. Enable desired alerts:
   * Sync failures
   * Sync warnings (>5% error rate)
   * Daily summary
3. Add recipient email addresses
4. Save changes

## Best Practices

### Recommended Schedule Configurations

| Use Case               | Recommended Schedule   | Why                           |
| ---------------------- | ---------------------- | ----------------------------- |
| Small org (<500 users) | Every 6 hours          | Low volume, frequent updates  |
| Medium org (500-5000)  | Every hour             | Balance of freshness and load |
| Large org (5000+)      | Every 15-30 min        | High volume, critical updates |
| Initial deployment     | Once daily (off-hours) | Full sync during rollout      |

### Avoid Overlapping Syncs

CloudSync prevents concurrent syncs, but scheduling overlaps can cause queue buildup:

* Space schedules at least 15 minutes apart
* Use different times for different source systems
* Monitor queue depth in the dashboard

### Handle Maintenance Windows

During planned maintenance:

{% stepper %}
{% step %}
Pause schedules

Pause all schedules before maintenance begins.
{% endstep %}

{% step %}
Perform maintenance

Complete maintenance on HR or identity systems.
{% endstep %}

{% step %}
Catch up

Run a manual sync to catch up.
{% endstep %}

{% step %}
Resume schedules

Resume schedules once verified.
{% endstep %}
{% endstepper %}

## Troubleshooting

### Schedule Not Running

Symptom: Job shows as enabled but never executes.

Solutions:

1. Check the time zone setting matches your expectations
2. Verify the cron expression is valid
3. Check that no other long-running job is blocking
4. Review system logs for errors

### Jobs Taking Too Long

Symptom: Sync jobs take longer than expected.

Solutions:

1. Switch to incremental sync instead of full
2. Check network connectivity to HR system
3. Review rate limits on Microsoft Graph
4. Consider scheduling during off-hours

### Missed Schedules

Symptom: Expected jobs didn't run.

Possible causes:

* System was down during scheduled time
* Concurrent job was still running
* Schedule was inadvertently paused

Resolution:

1. Check system uptime for the period
2. Review job history for overlaps
3. Run manual sync to catch up

## Related Topics

* [Monitoring Syncs](/features/monitoring.md) - Real-time monitoring
* [Data Mapping](/features/data-mapping.md) - Configure what fields sync
* Troubleshooting - Common sync problems


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aohwv.dev/features/scheduling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
