---
title: "Schedule an OCR task to process a folder automatically"
description: "Create an SMB storage connection, pick input and output folders, set the weekly schedule and folder depth, then confirm the schedule fires"
canonical_url: "https://docs.ardge.com/en/knowledge/precisemd/schedule-ocr-tasks"
---
# Schedule an OCR task to process a folder automatically

> Create an SMB storage connection, pick input and output folders, set the weekly schedule and folder depth, then confirm the schedule fires

## Overview

An **OCR task** reads files from a source folder and writes the parsed Markdown into another one. Set up a **Sync schedule** and the task runs automatically on the days and time you choose, so new files dropped into the source folder get processed without anyone triggering them.

This article covers creating an SMB storage connection, creating the task and picking its input and output folders, setting the sync schedule and folder depth, and confirming the schedule fires.

## What you'll learn

- Create an SMB storage connection pointing at your NAS
- Create an OCR task and pick input and output locations with the folder picker
- Set the days and time of the weekly run
- Control how many subfolder levels are scanned with folder depth

**Estimated time: about 20 minutes**, not counting permission changes on the NAS

## Applies to

- PreciseMD 1.4.0 and later

## Before you begin

- The model connection is set up — see [Set up the model connection in PreciseMD](https://docs.ardge.com/en/knowledge/precisemd/model-connection)
- You have created an account on the NAS for PreciseMD, with **read access to the source folder** and **write access to the target folder**
- You have the NAS IP address, that account's username and password, and the name of the shared folder to use

## Step 1: Create a storage connection

The task's input and output both point at storage connections. Skip this step if the connections you need already exist.

1. Go to the **Storage connections** page
2. Click **Add connection** in the *Remote connection management* section
3. Fill in the fields as follows

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Rules and notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Name
      </strong>
    </td>
    
    <td>
      A name that identifies this connection
    </td>
    
    <td>
      Required, up to 30 characters
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        IP address
      </strong>
    </td>
    
    <td>
      The NAS IP address
    </td>
    
    <td>
      Required, formatted like <code>
        192.168.X.XXX
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Username
      </strong>
    </td>
    
    <td>
      The NAS account for PreciseMD
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Password
      </strong>
    </td>
    
    <td>
      That account's password
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Share name
      </strong>
    </td>
    
    <td>
      The shared folder to connect to
    </td>
    
    <td>
      Required. The system fetches the list from the NAS using the four values above
    </td>
  </tr>
</tbody>
</table>

1. Click the **Share name** dropdown. Until the four values above are filled in, it shows "Fill in the connection details first"
2. Select a shared folder and click **Save**

The page shows "Data source created" and the connection appears in the *Remote connection management* list.

![The Storage Connections page](https://docs.ardge.com/screenshots/knowledge/en/precisemd/schedule-ocr-tasks/step-1-1.webp)

![Adding a remote connection](https://docs.ardge.com/screenshots/knowledge/en/precisemd/schedule-ocr-tasks/step-1-2.webp)

## Step 2: Create the task and pick input and output folders

1. Go to the **OCR tasks** page and click **Create task**
2. Enter a task name in **Name**
3. Select the source storage connection in the dropdown to the left of **Input folder**, then click the folder button on the right
4. Pick the source folder in the folder picker that opens:

  - Click a folder name to select that folder
  - Click the arrow icon at the right of the row, **Enter folder**, to browse one level down
  - Click the back icon at the top, **Up one level**, to go back
  - Click the check icon at the top, **Select this level**, to select the level you're currently on
5. Pick the target storage connection and folder for **OCR output folder** the same way. The target folder picker also offers a **Create folder** icon, so you can create a new folder at that level

![Creating a task](https://docs.ardge.com/screenshots/knowledge/en/precisemd/schedule-ocr-tasks/step-2-1.webp)

![Choosing the input folder](https://docs.ardge.com/screenshots/knowledge/en/precisemd/schedule-ocr-tasks/step-2-2.webp)

<warning>

**Source and target must not overlap:**

They can't be the same folder, and neither can be inside the other — submitting shows "The source and target folders can't be the same or nested, or the output would be reprocessed". The target folder must not overlap another task's folders either, which shows "The source or target folder can't overlap another task's".

</warning>

<note>

**Connection status limits what you can pick:**

Connections marked **Read-only** in the dropdown can only serve as the **Input folder**; the **OCR output folder** accepts only connections with status **Normal**.

</note>

## Step 3: Set the sync schedule

1. Select **Enable** in the **Sync schedule** section
2. Pick the days to run in the day selector — at least one
3. Set the run time in the time picker to the right

<warning>

**You can't submit without selecting a day:**

Select **Enable** without picking a day and submitting shows "Select at least one day."

</warning>

The schedule runs once to seven times a week, firing once at the chosen time on each selected day.

![The schedule time picker](https://docs.ardge.com/screenshots/knowledge/en/precisemd/schedule-ocr-tasks/step-3.webp)

## Step 4: Set the advanced options

1. Expand **Advanced settings** at the bottom of the form
2. Adjust these as needed

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Vision correction
      </strong>
    </td>
    
    <td>
      Selected
    </td>
    
    <td>
      Strengthens the OCR output with a multimodal model. For when to use it, see <a href="https://docs.ardge.com/en/knowledge/precisemd/vision-correction">
        When should I enable vision correction?
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Prompt editor
    </td>
    
    <td>
      Empty
    </td>
    
    <td>
      Describes the document type and content. Disabled while <strong>
        Vision correction
      </strong>
      
       is cleared. With prompt templates saved, apply one from <strong>
        Choose from prompts
      </strong>
      
       at the top right
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Folder depth
      </strong>
    </td>
    
    <td>
      <code>
        10
      </code>
    </td>
    
    <td>
      How many subfolder levels to scan, from 1 to 100. Folders deeper than that, and the files in them, are skipped
    </td>
  </tr>
</tbody>
</table>

1. Click **Create**

The page shows "Task created", the task appears in the **OCR tasks** list, and the **Next scheduled run** column shows when it will next fire.

## Step 5: Confirm the schedule fires

The task runs on its own once the scheduled time arrives.

1. Go to the **OCR tasks** page
2. Check the task's **Last run** column for the status and completion time
3. Open the action menu on that row and choose **History**
4. Check the **Trigger** column on the newest row

**Trigger** reads **Scheduled** when the schedule fired it, and **Manual** when someone clicked the run button.

![The task list and next scheduled run](https://docs.ardge.com/screenshots/knowledge/en/precisemd/schedule-ocr-tasks/step-5.webp)

## Files already processed are not re-run

On every run, the task scans the source folder and compares file paths and content hashes against its existing records. Files whose content hasn't changed are skipped, marked **Skipped** in **File details** with **Content unchanged** in the notes column. Repeated scheduled runs therefore never re-parse an unmodified file.

## Troubleshooting

<table>
<thead>
  <tr>
    <th>
      Message
    </th>
    
    <th>
      Likely cause
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        The source and target folders can't be the same or nested, or the output would be reprocessed
      </code>
    </td>
    
    <td>
      Input and output point at the same folder, or one is inside the other
    </td>
    
    <td>
      Go back to Step 2 and pick two folders that don't overlap
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        The source or target folder can't overlap another task's
      </code>
    </td>
    
    <td>
      The folder overlaps another task's setup
    </td>
    
    <td>
      Go back to Step 2 and use an output folder of its own
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Task name already exists
      </code>
    </td>
    
    <td>
      The name duplicates an existing task
    </td>
    
    <td>
      Go back to Step 2 and use a different name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        NAS authentication failed
      </code>
    </td>
    
    <td>
      The storage connection's username or password is wrong
    </td>
    
    <td>
      Go back to Step 1, edit that connection, and re-enter the credentials
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Insufficient NAS permissions
      </code>
    </td>
    
    <td>
      The NAS account lacks permissions on that folder
    </td>
    
    <td>
      On the NAS, grant read access to the source folder and write access to the target folder
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        A run is already in progress. Try again later
      </code>
    </td>
    
    <td>
      The previous run hasn't finished
    </td>
    
    <td>
      Wait for it to finish before triggering another
    </td>
  </tr>
</tbody>
</table>

## Next steps

After a run, trace each file's result through the history — see [Check OCR task history and troubleshoot failed files](https://docs.ardge.com/en/knowledge/precisemd/ocr-task-history).

## Related articles

- [What files are produced in the OCR output folder?](https://docs.ardge.com/en/knowledge/precisemd/ocr-output-files)
- [When should I enable vision correction?](https://docs.ardge.com/en/knowledge/precisemd/vision-correction)
- [What file formats and limits does PreciseMD support?](https://docs.ardge.com/en/knowledge/precisemd/formats-and-limits)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
