Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Mintplex-Labs/anything-llm/llms.txt

Use this file to discover all available pages before exploring further.

Scheduled Jobs let you automate any prompt or agent workflow to run on a repeating cron schedule—without any manual intervention. You write the prompt once, pick a schedule, and AnythingLLM handles the rest: it spawns an isolated agent worker for each execution, logs every run with status and output, and sends you a push notification when the job completes. Whether you need a daily market summary, an automated web research digest, or a weekly report generated from your embedded documents, Scheduled Jobs handle it end-to-end.
Scheduled Jobs use the full AnythingLLM agent runtime, including all configured agent skills: RAG memory, web browsing, web scraping, SQL querying, file system access, Gmail, Google Calendar, Outlook, MCP servers, custom imported plugins, and agent flows. Each job can be configured with its own independent toolset.

Creating a Scheduled Job

1

Open Scheduled Jobs

Navigate to System Settings → Scheduled Jobs and click New Scheduled Job.
2

Name your job and write the prompt

Give the job a descriptive name. Then write the prompt exactly as you would type it into an agent chat—be specific about what you want the agent to produce. The agent will follow the prompt faithfully on every scheduled execution.
3

Set the cron schedule

Enter a standard 5-field cron expression for when the job should run. All cron expressions are interpreted in UTC. The UI will show you the next computed run time after you enter a valid expression.
┌─────────── minute (0-59)
│ ┌─────────── hour (0-23)
│ │ ┌─────────── day of month (1-31)
│ │ │ ┌─────────── month (1-12)
│ │ │ │ ┌─────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
4

Select agent tools (optional)

Choose which agent skills the job is allowed to use. Each scheduled job has its own independent tool configuration—you can give one job access to web browsing while another only uses RAG memory. Leave the list empty to use no tools (plain LLM completion only).
5

Enable the job

Toggle the job to Enabled and save. The job will run at the next scheduled time according to your cron expression.

Cron Schedule Examples

ExpressionMeaning
0 9 * * *Every day at 9:00 AM UTC
0 9 * * 1Every Monday at 9:00 AM UTC
0 8,17 * * 1-5Weekdays at 8:00 AM and 5:00 PM UTC
0 0 1 * *First day of every month at midnight UTC
0 */4 * * *Every 4 hours
30 6 * * 1-5Weekdays at 6:30 AM UTC
0 18 * * 5Every Friday at 6:00 PM UTC
The UI converts your local time to UTC automatically when displaying next-run times. When writing your cron expression, enter it in UTC. For example, 0 9 * * * fires at 9:00 AM UTC—which is 5:00 AM Eastern or 2:00 AM Pacific.

Job Runs and Status

Every time a scheduled job fires, a job run record is created and tracked through its full lifecycle:
StatusMeaning
queuedThe run has been claimed by the queue; the worker process has not started yet
runningThe agent worker is actively executing the prompt
completedThe job finished successfully; result text and tool call trace are stored
failedThe job encountered an error before completing
timed_outThe job exceeded SCHEDULED_JOB_TIMEOUT_MS and was terminated
You can view the full run history for any job—including the agent’s complete response text, tool calls made, and timing metrics—directly from the Scheduled Jobs UI.

Continuing a Run in a Workspace Thread

From any completed run, you can click “Continue in Thread” to open the job’s response as a new chat thread in the dedicated scheduled-jobs workspace. This lets you ask follow-up questions, dig deeper into the results, or use the output as a starting point for further research.

Handling Orphaned Runs

If the AnythingLLM server restarts while a job is queued or running, those in-flight runs are automatically marked as failed with the message "Server restarted during execution" on the next startup. No run is ever left stuck in a non-terminal state.

Environment Variables

You can tune scheduled job behavior with these variables in your .env file or Docker environment:
SCHEDULED_JOB_MAX_CONCURRENT=1
Controls the maximum number of scheduled job workers that can execute simultaneously. Defaults to 1 (sequential execution). Increase this value if you have many jobs scheduled close together and your LLM provider can handle the parallel load.The concurrency limit is enforced by a p-queue worker pool inside the BackgroundWorkers service—jobs that exceed the limit are queued and executed as slots become available.
SCHEDULED_JOB_TIMEOUT_MS=300000
Maximum time in milliseconds that a single job execution can run before being forcibly terminated. Defaults to 300000 (5 minutes). If the agent does not finish within this window, the run is marked timed_out.Increase this value for jobs that perform long web scraping chains or process large documents. Note that a timed-out job may still have consumed LLM tokens up to the point it was terminated.
Raising SCHEDULED_JOB_MAX_CONCURRENT above 1 means multiple jobs may fire LLM API calls simultaneously. If you are using a cloud provider with strict rate limits (e.g., OpenAI Tier 1), concurrent jobs can quickly exhaust your requests-per-minute quota and cause failures. Start with the default of 1 and only increase it when you have confirmed sufficient API rate-limit headroom.

Agent Tools Available to Scheduled Jobs

Each scheduled job can independently select from the full set of available agent skills. Unlike workspace-level agent settings, the tool selection is per-job—you can give a research job access to web browsing without enabling it for a document summary job.
  • Agent Skills: RAG Memory, Document Summarizer, Web Scraping, Create Charts, Web Browsing, SQL Agent
  • File System: Read, write, and list files in the server’s storage directory
  • Create Files: Generate PDFs, Word documents, Excel spreadsheets, and more
  • Gmail: Read inbox, send emails, manage labels (requires Gmail OAuth setup)
  • Google Calendar: Create, read, and update calendar events (requires Google Calendar OAuth setup)
  • Outlook: Read mail, send emails, manage calendar (requires Outlook OAuth setup)
  • Custom Skills: Any imported plugin packages you’ve added to your instance
  • Agent Flows: Any saved agent flows you’ve built in the Flow Builder
  • MCP Servers: Any connected Model Context Protocol servers and their exposed tools
When a tool requires setup (for example, SQL Agent with no connected databases, or Gmail with no OAuth configured), it is shown as requiresSetup: true in the tool picker and will fail gracefully if selected without proper configuration.

Use Cases

Daily News Digest

Scrape a set of news sources or RSS feeds every morning and produce a structured summary dropped into a workspace thread for your team.

Automated Research

Run competitive analysis jobs that search the web for mentions of your product, competitors, or industry keywords and compile a weekly brief.

Document Q&A Rollups

Query your embedded document corpus on a schedule to surface newly relevant information—ideal for compliance monitoring or knowledge-base auditing.

Scheduled Report Generation

Query connected SQL databases and generate formatted Excel or PDF reports on a monthly cadence, fully automated without any human trigger.

Build docs developers (and LLMs) love