---
title: "Scheduled Tasks"
space: "TIMS Tevin Type-C Integration"
url: "https://docs.navari.co.ke/tims-tevin/scheduled-tasks"
updated: "2026-05-26"
---

## Scheduled Tasks

The integration registers a **background scheduled task** that runs every minute. Its job is to:

1. Query the **Integration Request** doctype for any records with status **"Queued"** or **"Failed"**
2. Attempt to resubmit each pending invoice to Tevin
3. Update the Integration Request status based on the response

This means that even if your server has a brief network hiccup during invoice submission, the invoice will be automatically resubmitted without any manual intervention within a minute.



### Verifying the Scheduler Is Running

In a production self-hosted environment, ensure the bench scheduler is active:

```sh
# Check scheduler status
bench --site {sitename} scheduler status

# Enable if disabled
bench --site {sitename} enable-scheduler

# Restart workers
bench restart
# or in a supervisor-managed environment:
sudo supervisorctl restart all

```



On Frappe Cloud, the scheduler is managed automatically.