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
Getting Started
There are two ways to create and manage scheduled tasks:- AI Chat - Simply tell the AI assistant what you want to schedule in plain language
- Scheduled Tasks Panel - Use the visual interface to configure tasks manually
Method 1: Using AI Chat (Recommended for Beginners)
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
- Open your app in the Builder
- Open the Chat panel
- Describe what you want to schedule in plain language
[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 Want | What 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 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
- Open your app in the Builder
- Look for the Scheduled Tasks option in the left sidebar or panels area
- Click to open the Scheduled Tasks panel
[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 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
| Option | Description | Example |
|---|---|---|
| Every X Minutes | Runs at regular minute intervals | Every 15 minutes |
| Hourly | Runs once every hour | At minute 0 of every hour |
| Daily | Runs once per day | Every day at 9:00 AM |
| Weekly | Runs on specific days of the week | Every Monday and Friday at 8:00 AM |
| Monthly | Runs once per month | First day of every month |
[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 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.- Select One-Time as the schedule type
- Use the date and time picker to choose when the task should run
- The task will run once at that time and then automatically archive itself
[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 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:- Look for the “Show archived” button in the panel header
- Click it to reveal all archived tasks
- Click “Hide archived” to hide them again
[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…”
| Action | What It Does | AI Chat Example |
|---|---|---|
| Edit | Change the task’s settings | ”Change the daily report to run at 10 AM instead” |
| Duplicate | Create a copy of the task | ”Duplicate the sync task” |
| Pause | Temporarily stop a recurring task | ”Pause the hourly sync” |
| Resume | Restart a paused task | ”Resume the hourly sync” |
| Run Now | Immediately execute the task | ”Run the backup task now” |
| Archive | Permanently stop the task | ”Archive the old report task” |
| Delete | Remove the task entirely | ”Delete the test task” |
[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 PLACEHOLDER: Show the expanded task view with execution logs displaying timestamps, status badges, and duration]
Understanding Status Indicators
| Status | Meaning |
|---|---|
| 🟢 Success | The function completed without errors |
| 🔴 Error | Something went wrong during execution |
| 🟡 Timeout | The function took too long (over 3 minutes) and was stopped |
| ⏳ Running | The function is currently executing |
Troubleshooting Failed Tasks
When a task fails, you can:- View the error message - Expand the log entry to see what went wrong
- Use “Resolve with AI” - Click this button to get help understanding and fixing the error
- Run again - Once you’ve fixed the issue, use “Run Now” to test it
[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:- Use Run Now to test it immediately
- Check the execution logs to make sure it succeeded
- 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
- 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
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:- Check that your app has custom integrations enabled
- Verify you’re on the Moon plan or higher
- Review the execution logs for error messages
- Use the “Resolve with AI” feature for help with specific errors
[SCREENSHOT PLACEHOLDER: Show where users can find additional help or support options]