The triggers command manages function triggers on a branch. A trigger invokes a Neon Function on a cron schedule (schedule), or when an object is created in an Object Storage bucket (storage_object_created). Use it to run recurring work like a nightly report or cleanup job, or to process uploads as they land, without a separate scheduler. You deploy the function with neon functions deploy, then point a trigger at it by slug.
Triggers are branch-scoped. Pass --project-id and --branch to target a branch, or let the CLI resolve them from your context file. Triggers can also be inherited: a trigger created on a parent branch is visible on its child branches, where the Inherited column shows true. An inherited trigger stays disabled on the child until you enable it there with neon triggers enable.
neon triggers list
Lists the triggers on the branch.
neon triggers list [options]neon triggers list --project-id solitary-heart-93902637 --branch mainThe Type column shows each trigger's type, currently schedule or storage_object_created. Schedule holds the cron for schedule triggers; Storage holds the bucket (and prefix, if set) for storage triggers.
Trigger ID Name Type Function Slug Function Path Schedule Storage Enabled Inherited Next Run At
trigger-12345678-90ab-cdef-1234-567890abcdef nightly-report schedule child404 / 0 6 * * * true false 2026-09-11T06:00:00.000000Z
trigger-abcdef12-3456-7890-abcd-ef1234567890 on-upload storage_object_created ingest /object assets logos/ true falseneon triggers get
Shows a single trigger by ID.
neon triggers get <id> [options]neon triggers get trigger-12345678-90ab-cdef-1234-567890abcdef --project-id solitary-heart-93902637 --branch main --output jsonShow output
{
"type": "schedule",
"trigger_id": "trigger-12345678-90ab-cdef-1234-567890abcdef",
"function_slug": "child404",
"name": "nightly-report",
"function_path": "/",
"schedule": {
"cron": "0 6 * * *"
},
"enabled": true,
"version": 1390408,
"next_run_at": "2026-09-11T06:00:00.000000Z",
"inherited": false
}A storage_object_created trigger has storage_object_created (bucket and optional prefix) in place of schedule, and no next_run_at:
Show output
{
"type": "storage_object_created",
"trigger_id": "trigger-abcdef12-3456-7890-abcd-ef1234567890",
"function_slug": "ingest",
"name": "on-upload",
"function_path": "/object",
"storage_object_created": {
"bucket_name": "assets",
"prefix": "logos/"
},
"enabled": true,
"version": 1390512,
"inherited": false
}neon triggers create
Creates a trigger that invokes a function on a cron schedule or when an object is created. --function-slug and --name are required, and the name must be unique on the branch. Choose the type with one of:
--cronfor ascheduletrigger, a five-field UTC cron expression.--bucketfor astorage_object_createdtrigger, with an optional--prefixto match only object keys under that prefix.
--cron and --bucket are mutually exclusive (Pass --cron or --bucket, not both.), and --prefix requires --bucket.
Object-created triggers (--bucket and --prefix) require Neon CLI 4.21.0 or later. On an older CLI, --bucket isn't recognized and create reports a missing --cron argument instead.
neon triggers create [options]By default the invocation is sent to / and the trigger is enabled. Use --function-path to send it to another route, and --enabled false to create it in a disabled state.
A schedule trigger:
neon triggers create --function-slug child404 --name nightly-report --cron '0 6 * * *' --project-id solitary-heart-93902637 --branch mainTrigger ID trigger-12345678-90ab-cdef-1234-567890abcdef
Name nightly-report
Type schedule
Function Slug child404
Function Path /
Schedule 0 6 * * *
Enabled true
Inherited false
Next Run At 2026-09-11T06:00:00.000000ZA storage trigger that fires when an object is created under logos/ in the assets bucket:
neon triggers create --function-slug ingest --name on-upload --bucket assets --prefix 'logos/' --function-path /object --project-id solitary-heart-93902637 --branch mainneon triggers update
Updates a trigger. Pass at least one of --function-slug, --name, --function-path, or --enabled, plus the field matching the trigger's type: --cron for a schedule trigger, or --bucket/--prefix for a storage_object_created trigger. With no fields to change, the command returns an error. The type is fixed at creation, so passing --cron to a storage trigger, or --bucket/--prefix to a schedule trigger, is rejected (Trigger <id> is type <type>; ...). Changing a schedule recomputes Next Run At.
neon triggers update <id> [options]Reschedule a schedule trigger:
neon triggers update trigger-12345678-90ab-cdef-1234-567890abcdef --cron '*/30 * * * *' --project-id solitary-heart-93902637 --branch mainChange the prefix a storage trigger matches:
neon triggers update trigger-abcdef12-3456-7890-abcd-ef1234567890 --prefix 'incoming/' --project-id solitary-heart-93902637 --branch mainneon triggers enable
Enables a trigger so it runs on its schedule. Enabling recomputes Next Run At.
neon triggers enable <id> [options]neon triggers enable trigger-12345678-90ab-cdef-1234-567890abcdef --project-id solitary-heart-93902637 --branch mainneon triggers disable
Disables a trigger without deleting it. A disabled trigger keeps its definition but does not run, and its Next Run At is cleared. Re-enable it with neon triggers enable.
neon triggers disable <id> [options]neon triggers disable trigger-12345678-90ab-cdef-1234-567890abcdef --project-id solitary-heart-93902637 --branch mainneon triggers delete
Deletes a trigger.
neon triggers delete <id> [options]neon triggers delete trigger-12345678-90ab-cdef-1234-567890abcdef --project-id solitary-heart-93902637 --branch mainTrigger trigger-12345678-90ab-cdef-1234-567890abcdef deleted







