Skip to main content
Before continuing, make sure you’re familiar with:

Background Tasks in Xano

Background tasks (also called scheduled tasks or cron jobs) allow you to automate operations at specific times or intervals. They are ideal for recurring jobs like data cleanup, report generation, or sending notifications. Each background task has:
  • A name (unique identifier, e.g., daily_sales_report)
  • Logic (the actions to perform)
  • A schedule (when and how often to run)
Unlike APIs, background tasks do not have inputs or responses. They only contain logic and a schedule block.

Creating a Background Task

You can create background tasks visually or with XanoScript.

Visual Builder

1

Add a New Task

From the left-hand menu, click Tasks, then click Add Background Task.
background-tasks-20251020-084325
2

Configure the Task

Give your task a name and description, and choose the data source that the task will run against, by default. If you don’t choose a data source, scheduled runs will always use the live data source.
background-tasks-20251020-084540
  • Build Visually
  • XanoScript
Add functions to your task by clicking Add Function. You can use any function available in Xano, just like in APIs.
background-tasks-20251020-084713
When you’ve finished building your logic, you can set up the schedule by clicking the Add a schedule option.Schedules have a start date / time, and can run once or on a repeating interval (e.g., every hour, day, week, etc.). For tasks that have a repeating schedule, you can also set an end date.
background-tasks-20251020-084908
After configuring the schedule, click Save to create your background task.You’ll need to enable your task before publishing by selecting the option.
background-tasks-20251020-085101

Active/Inactive toggle in the Canvas View


background-tasks-20251020-085136

Enable option in the Function Stack view

Once you’ve set your schedule and enabled the task, click Publish to deploy your background task.
I