---
name: bijection-crons
description: "Evaluate and integrate the Crons component with Bijection."
---

# Crons

Runtime-managed recurring schedules

- Package: @bijectionhq/crons
- Category: Durable Functions
- Status: Preview
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/crons/tree/b9fa198de79e18be5b6400ad4090570f0591e986
- Upstream: https://github.com/convex/crons/tree/4ea5b4f133222c5125a7126cb9e42fa0a27a97b5
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/crons

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/crons.git
cd crons
git checkout b9fa198de79e18be5b6400ad4090570f0591e986
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @convex-dev/crons. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


> Agents: read this skill fully before writing code that uses Crons. Follow the installation and configuration steps exactly.

# Crons

## Instructions

This component extends Convex's built-in cron functionality by enabling dynamic registration and management of cron jobs at runtime. While Convex's native crons must be statically defined at deployment time, this component provides programmatic APIs to create, update, and delete scheduled jobs from within your functions. It supports both traditional cron expressions and simple millisecond intervals for flexible scheduling needs.

### Installation

```bash
npm install @convex-dev/crons
```

Current npm version: `@convex-dev/crons@0.2.3`

## Use cases

- **Dynamic content scheduling** - Register cleanup jobs, send reminder emails, or archive old data based on user actions or database events
- **Tenant-specific automation** - Create per-customer scheduled tasks like report generation, billing cycles, or data backups without hardcoding schedules
- **Self-managing workflows** - Build cron jobs that register follow-up tasks or delete themselves after completion, enabling complex multi-step automations
- **Runtime configuration** - Allow admins to configure maintenance windows, batch processing schedules, or monitoring intervals through your application UI
- **Event-driven scheduling** - Create temporary scheduled tasks in response to user signup, subscription changes, or other business events

## How it works

The component provides a `Crons` wrapper class that manages scheduled jobs through five core methods: `register()`, `get()`, `list()`, and `delete()`. Jobs can be scheduled using either cron expressions (supporting the standard unix cron format with optional seconds) or simple millisecond intervals.

After installing the component via `npm install @convex-dev/crons` and configuring it in `convex.config.ts`, you instantiate the wrapper with `new Crons(components.crons)`. The `register()` method accepts a schedule specification, target function reference, arguments object, and optional name for later retrieval.

Cron jobs are created transactionally within mutations, guaranteeing they exist after the creating transaction commits. This enables reliable patterns like self-deleting crons or workflows where job creation and subsequent operations must be atomic. For static job definitions similar to built-in crons, you can use idempotent registration in init scripts that check for existing jobs by name before creating them.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by Crons is not needed

## Resources

- [npm package](https://www.npmjs.com/package/%40convex-dev%2Fcrons)
- [GitHub repository](https://github.com/get-convex/crons)
- [Live demo](https://www.convex.dev/templates/open-source-cronvex)
- [Convex Components Directory](https://www.convex.dev/components/crons)
- [Convex documentation](https://docs.convex.dev)