Skip to main content
Automations allow backend functions to run automatically on a schedule or in response to database events. Use automations to process data at regular intervals, handle entity changes, or execute one-time tasks at specific times. Each backend function can have multiple automations attached, configured in the function’s function.jsonc file. Automations are deployed atomically with the function code when you run deploy or functions deploy.

Automation types

Base44 supports 3 types of automations:

Common fields

Common fields for all automations

All automation types share the following fields:
FieldTypeRequiredDescription
typestringYesThe automation type. Possible values: "scheduled" or "entity".
namestringYesUnique identifier for the automation.
descriptionstringNoHuman-readable description.
function_argsobjectNoArguments passed to the function when triggered. See Function arguments.
is_activebooleanNoWhether the automation is enabled. Default: true.

Common fields for scheduled automations

Both cron and simple scheduled automations share these additional fields:
FieldTypeRequiredDescription
schedule_modestringYesWhether the schedule repeats. Possible values: "recurring" or "one-time".
schedule_typestringYesScheduling method to use. Possible values: "cron" or "simple".
ends_typestringNoWhen the recurring schedule should stop. Possible values: "never", "on", or "after". Default: "never".
ends_on_datestringConditionalDate when the recurring schedule ends, inclusive, in UTC. Required when ends_type is "on". Format: YYYY-MM-DDTHH:MM:SSZ. For example, "2026-12-31T23:59:59Z".
ends_after_countnumberConditionalNumber of executions after which the recurring schedule stops. Required when ends_type is "after".

Automation configuration

Configure automations in your function.jsonc file using one of the following approaches. All automations use the common fields for all automations listed above, plus the fields specific to each type.

Cron

Use common fields for all automations and common fields for scheduled automations along with the cron-specific fields listed here. Set type to "scheduled" and schedule_type to "cron" to use cron expressions for precise scheduling control. Cron automations use standard 5-field syntax: minute hour day-of-month month day-of-week. See crontab.guru for an interactive cron expression editor and syntax reference.
FieldTypeRequiredDescription
cron_expressionstringYes5-field cron expression.

Example

This example runs a function every day at midnight UTC:
{
  "name": "sendDailyReport",
  "entry": "index.ts",
  "automations": [
    {
      "type": "scheduled",
      "name": "daily_midnight_report",
      "description": "Runs every day at midnight UTC",
      "function_args": { "mode": "full_sync" },
      "is_active": true,
      
      "schedule_mode": "recurring",
      "schedule_type": "cron",
      "cron_expression": "0 0 * * ?"
    }
  ]
}

Simple schedule

Use common fields for all automations and common fields for scheduled automations along with the simple schedule fields listed here. Set type to "scheduled" and schedule_type to "simple" for straightforward scheduling needs. Configure recurring tasks by interval such as minutes, hours, days, weeks, or months without writing cron expressions.
FieldTypeRequiredDescription
one_time_datestringConditionalDate and time when the automation runs once, in UTC. Required when schedule_mode is "one-time". Format: YYYY-MM-DDTHH:MM:SSZ. For example, "2026-02-15T10:00:00Z".
repeat_unitstringConditionalTime unit for recurring automations. Required when schedule_mode is "recurring". Possible values: "minutes", "hours", "days", "weeks", or "months".
repeat_intervalnumberConditionalInterval between executions. Required when repeat_unit is "minutes", "hours", or "days".
start_timestringConditionalTime of day when the automation runs, in UTC. Required when repeat_unit is "days", "weeks", or "months". Format: HH:MM.
repeat_on_daysnumber[]ConditionalDays of the week when the automation runs. Required when repeat_unit is "weeks". Array of weekday numbers, where 0 is Sunday and 6 is Saturday.
repeat_on_day_of_monthnumberConditionalDay of the month when the automation runs. Required when repeat_unit is "months". Valid values: 1-31.

Examples

The following examples show different ways to schedule automations with simple schedules:
{
  "type": "scheduled",
  "name": "every_30_minutes",
  "description": "Runs every 30 minutes.",
  "is_active": true,
  
  "schedule_mode": "recurring",
  "schedule_type": "simple",
  "repeat_unit": "minutes",
  "repeat_interval": 30
}

Entity events

Use common fields for all automations along with the entity event fields listed here. Set type to "entity" to trigger functions automatically when database records are created, updated, or deleted. Entity automations can listen to 1 or more event types on a specific entity.
FieldTypeRequiredDescription
entity_namestringYesName of the entity to monitor.
event_typesstring[]YesDatabase events to listen for. Possible values: "create", "update", "delete". At least 1 required.

Examples

The following examples show how to trigger functions based on entity events:
{
  "name": "processOrders",
  "entry": "index.ts",
  "automations": [
    {
      "type": "entity",
      "name": "on_order_changes",
      "description": "Triggered on order create, update, or delete.",
      "function_args": { "notify_slack": true },
      "is_active": true,
      
      "entity_name": "orders",
      "event_types": ["create", "update", "delete"]
    }
  ]
}

Function arguments

Pass data to your function when it’s triggered by including the function_args field in your automation configuration. This is useful when one function handles multiple automations with different behaviors, such as a sync function that runs incrementally every 15 minutes but does a full sync daily. Access these arguments in your function code through the request body.

Example

This example shows a function that handles both incremental and full sync modes based on the automation config:
Deno.serve(async (req) => {
  const body = await req.json();
  const args = body.args ?? {};
  
  // Use the arguments from automation config
  const mode = args.mode ?? "incremental";
  
  // Your function logic
});

Deploy automations

Deploy backend functions with their automations using the CLI functions deploy command or the unified deploy command. The deployment is atomic per function. A function is only considered deployed if both the Deno deployment and all its automations succeed. If any automation fails to deploy, the entire function deployment is rolled back. After deploying, the CLI shows which functions were successfully deployed, deleted, or had errors. Functions missing locally but existing on Base44 are removed.

Manage automations in the dashboard

Any changes made in the dashboard will be overwritten the next time you run functions deploy. There is no two-way sync between the dashboard and your local files. Automations defined in your local function.jsonc files are the source of truth.If you want to make changes to your automations, update your local function.jsonc files and redeploy. Use the dashboard for monitoring execution logs and manually triggering automations when needed.
View and manage your automations in the Base44 dashboard under the Automations tab. From the dashboard, you can:
  • View execution logs and history
  • Run automations manually for testing
  • Monitor automation status

See also