Skip to main content
Scheduled Tasks allow you to automate your app’s functions to run automatically at specific times or intervals. Think of it like setting an alarm clock for your app - you decide when something should happen, and the system takes care of running it for you.

What Can You Do with Scheduled Tasks?

  • Send daily reports - Automatically generate and send reports every morning
  • Clean up old data - Remove outdated records weekly or monthly
  • Sync information - Keep your data up-to-date by running sync operations hourly
  • Send reminders - Trigger notification functions at specific times
  • Run one-time operations - Schedule a function to run once at a future date

Requirements

Scheduled Tasks are available on the Moon plan or higher. You’ll also need to have custom integrations enabled for your app.

Credits Usage

Each scheduled task run costs 1 AI credit. Additionally, any actions performed within your scheduled task that normally consume credits will still cost their regular amount. For example:
  • Sending an email uses credits as usual
  • Using AI features (like generating text or analyzing data) costs additional credits
  • Database operations and other standard actions follow their normal credit costs
Keep this in mind when setting up frequently running tasks (like every few minutes) as credits can add up quickly.

Getting Started

There are two ways to create and manage scheduled tasks:
  1. AI Chat - Simply tell the AI assistant what you want to schedule in plain language
  2. Scheduled Tasks Panel - Use the visual interface to configure tasks manually
Both methods give you the same result - choose whichever feels more comfortable for you.
The easiest way to create scheduled tasks is by chatting with the AI assistant. Just describe what you want to happen and when, and the AI will set it up for you.

How to Use AI Chat for Scheduled Tasks

  1. Open your app in the Builder
  2. Open the Chat panel
  3. Describe what you want to schedule in plain language
![Screenshot: Chat panel location] [SCREENSHOT PLACEHOLDER: Show the Builder interface with the Chat panel open]

Example Prompts

Here are some examples of what you can say to the AI:
What You WantWhat to Say
Daily report”Schedule the sendDailyReport function to run every day at 9 AM”
Weekly cleanup”Create a task that runs cleanupOldData every Monday at midnight”
One-time task”Run the sendWelcomeEmails function once on January 15th at 2 PM”
Every hour”Set up an hourly task to sync customer data”
Specific days”Schedule the backup function to run on weekdays at 6 PM”
![Screenshot: AI chat creating a scheduled task] [SCREENSHOT PLACEHOLDER: Show a conversation where the user asks the AI to create a scheduled task and the AI confirms it was created]

What You Can Ask the AI to Do

  • Create tasks - “Schedule [function] to run [when]”
  • List tasks - “Show me all my scheduled tasks”
  • Pause tasks - “Pause the daily report task”
  • Resume tasks - “Resume the daily report task”
  • Run immediately - “Run the sync function now”
  • Check status - “What’s the status of my scheduled tasks?”

Tips for Talking to the AI

  • Be specific about timing - Say “every day at 9 AM” instead of just “daily”
  • Use function names - If you know the function name, include it
  • Ask for help - If you’re unsure, ask “What functions can I schedule?”

Method 2: Using the Scheduled Tasks Panel

If you prefer a visual interface, you can use the Scheduled Tasks panel to create and manage tasks manually.

Opening the Scheduled Tasks Panel

  1. Open your app in the Builder
  2. Look for the Scheduled Tasks option in the left sidebar or panels area
  3. Click to open the Scheduled Tasks panel
![Screenshot: Location of Scheduled Tasks panel in the Builder sidebar] [SCREENSHOT PLACEHOLDER: Show the Builder interface with the Scheduled Tasks panel highlighted in the sidebar]

Creating a New Task (Panel Method)

Step 1: Start Creating

Click the Add Task button to open the task creation form. ![Screenshot: Add Task button] [SCREENSHOT PLACEHOLDER: Show the Scheduled Tasks panel with the "Add Task" button highlighted]

Step 2: Fill in Basic Information

  • Task Name - Give your task a clear, descriptive name (e.g., “Daily Sales Report”, “Weekly Cleanup”)
  • Description (optional) - Add notes about what this task does
  • Function to Run - Select which function should execute when the task runs
![Screenshot: Task form with basic fields] [SCREENSHOT PLACEHOLDER: Show the task creation form with name, description, and function dropdown fields]

Step 3: Choose Schedule Type

You have two options:

Recurring Tasks

Tasks that run repeatedly on a schedule (hourly, daily, weekly, etc.)

One-Time Tasks

Tasks that run once at a specific date and time ![Screenshot: Schedule type selection] [SCREENSHOT PLACEHOLDER: Show the toggle or selection between "Recurring" and "One-Time" options]

Setting Up a Recurring Schedule

When you choose a recurring task, you’ll see a visual schedule builder. This makes it easy to set when your task should run without needing technical knowledge.

Schedule Options

OptionDescriptionExample
Every X MinutesRuns at regular minute intervalsEvery 15 minutes
HourlyRuns once every hourAt minute 0 of every hour
DailyRuns once per dayEvery day at 9:00 AM
WeeklyRuns on specific days of the weekEvery Monday and Friday at 8:00 AM
MonthlyRuns once per monthFirst day of every month
![Screenshot: Schedule builder interface] [SCREENSHOT PLACEHOLDER: Show the visual cron schedule builder with different timing options]

Selecting Days of the Week (Weekly Schedule)

When you choose a weekly schedule, you’ll see buttons for each day of the week. Click on the days you want the task to run. ![Screenshot: Day selection buttons] [SCREENSHOT PLACEHOLDER: Show the day-of-week selection buttons (S, M, T, W, T, F, S) with some days selected]

Setting End Conditions

For recurring tasks, you can choose when the task should stop running:
  • Never - The task runs indefinitely until you manually stop it
  • After X runs - The task automatically stops after running a specific number of times
  • On a specific date - The task stops on a date you choose
![Screenshot: End conditions options] [SCREENSHOT PLACEHOLDER: Show the end condition selector with the three options]

Setting Up a One-Time Task

One-time tasks are simpler - just pick the date and time when you want the function to run.
  1. Select One-Time as the schedule type
  2. Use the date and time picker to choose when the task should run
  3. The task will run once at that time and then automatically archive itself
![Screenshot: One-time date/time picker] [SCREENSHOT PLACEHOLDER: Show the datetime picker for one-time task scheduling]
Note: The time is based on your current timezone, which is displayed next to the picker.

Managing Your Tasks

You can manage your tasks using either the AI chat or the panel. The AI chat is great for quick actions (“pause the daily report”), while the panel gives you a complete overview of all tasks.

Viewing All Tasks

Via AI Chat: Ask “Show me all my scheduled tasks” or “What tasks are scheduled?” Via Panel: The main panel shows all your scheduled tasks with important information at a glance:
  • Task name and description
  • Which function it runs
  • Current status (Active, Paused, or Archived)
  • Last execution result (Success, Error, or Never Run)
![Screenshot: Task list view] [SCREENSHOT PLACEHOLDER: Show the main task list with multiple tasks displaying their status badges]

Showing Archived Tasks

By default, archived tasks are hidden from the list. To view them:
  1. Look for the “Show archived” button in the panel header
  2. Click it to reveal all archived tasks
  3. Click “Hide archived” to hide them again
This helps keep your task list clean while still allowing you to access old tasks when needed. ![Screenshot: Show/Hide archived toggle] [SCREENSHOT PLACEHOLDER: Show the "Show archived" button in the panel header and how the list changes when clicked]

Task Actions

Via AI Chat: Tell the AI what you want to do, for example:
  • “Pause the weekly backup task”
  • “Update the task schedule as follows…”
Via Panel: Click on a task to expand it and see available actions:
ActionWhat It DoesAI Chat Example
EditChange the task’s settings”Change the daily report to run at 10 AM instead”
DuplicateCreate a copy of the task”Duplicate the sync task”
PauseTemporarily stop a recurring task”Pause the hourly sync”
ResumeRestart a paused task”Resume the hourly sync”
Run NowImmediately execute the task”Run the backup task now”
ArchivePermanently stop the task”Archive the old report task”
DeleteRemove the task entirely”Delete the test task”
![Screenshot: Task actions menu] [SCREENSHOT PLACEHOLDER: Show an expanded task with the action buttons visible]

Monitoring Task Execution

Viewing Execution Logs

Each task keeps a history of every time it ran. Expand a task to see its execution logs. The logs show:
  • When it ran - Date and time of execution
  • Status - Success, Error, or Timeout
  • Duration - How long it took to complete
  • Error details - If something went wrong, you’ll see the error message
![Screenshot: Execution logs] [SCREENSHOT PLACEHOLDER: Show the expanded task view with execution logs displaying timestamps, status badges, and duration]

Understanding Status Indicators

StatusMeaning
🟢 SuccessThe function completed without errors
🔴 ErrorSomething went wrong during execution
🟡 TimeoutThe function took too long (over 3 minutes) and was stopped
RunningThe function is currently executing

Troubleshooting Failed Tasks

When a task fails, you can:
  1. View the error message - Expand the log entry to see what went wrong
  2. Use “Resolve with AI” - Click this button to get help understanding and fixing the error
  3. Run again - Once you’ve fixed the issue, use “Run Now” to test it
![Screenshot: Error details and Resolve with AI button] [SCREENSHOT PLACEHOLDER: Show a failed task log with expanded error details and the "Resolve with AI" button]

Best Practices

Naming Your Tasks

Use clear, descriptive names that explain what the task does:
  • ✅ “Daily Customer Report Email”
  • ✅ “Weekly Database Cleanup”
  • ❌ “Task 1”
  • ❌ “My task”

Choosing the Right Schedule

  • Every few minutes - Use for time-sensitive operations that need frequent updates
  • Hourly - Good for regular syncs that don’t need to be instant
  • Daily - Perfect for reports, summaries, and cleanup operations
  • Weekly/Monthly - Use for less frequent maintenance tasks

Monitoring New Tasks

When you create a new task, it’s a good idea to:
  1. Use Run Now to test it immediately
  2. Check the execution logs to make sure it succeeded
  3. Review any error messages and fix issues before the scheduled time

Setting End Conditions

  • Use After X runs when you know exactly how many times something needs to happen
  • Use On a specific date for temporary tasks (like a limited-time promotion)
  • Use Never for ongoing operations that should run indefinitely

Frequently Asked Questions

Should I use AI Chat or the Panel?

Use AI Chat when you want to:
  • Quickly create a simple task with natural language
  • Perform quick actions like pausing or running a task
  • Get help figuring out what schedule you need
Use the Panel when you want to:
  • See all your tasks at once
  • Configure advanced options like end conditions
  • Review execution logs and troubleshoot errors
  • Have more precise control over cron expressions
Both methods work equally well - it’s just a matter of personal preference!

What timezone are schedules based on?

Schedules use UTC (Coordinated Universal Time) for recurring tasks. The interface shows your local timezone for one-time tasks to make scheduling easier.

How long can a task run?

Tasks have a 3-minute timeout. If your function takes longer than 3 minutes, it will be stopped and marked as “Timeout”.

Can I run a task manually?

Yes! Use the Run Now button to execute any task immediately, regardless of its schedule.

What happens if a task fails?

The task will show an “Error” status, and you can view the error details in the logs. Failed tasks don’t automatically retry - you’ll need to fix the issue and either wait for the next scheduled run or use “Run Now”.

Can I edit a task that’s currently running?

It’s best to wait until the current execution completes before making changes.

What happens to one-time tasks after they run?

One-time tasks are automatically archived after they execute successfully.

How many tasks can I create?

There’s no set limit on the number of scheduled tasks you can create.

Need Help?

If you’re having trouble with Scheduled Tasks:
  1. Check that your app has custom integrations enabled
  2. Verify you’re on the Moon plan or higher
  3. Review the execution logs for error messages
  4. Use the “Resolve with AI” feature for help with specific errors
![Screenshot: Help resources] [SCREENSHOT PLACEHOLDER: Show where users can find additional help or support options]