> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# crons.ts

> Schedule recurring functions in the crons.ts file.

`bijection/crons.ts` allows you to define [**cron jobs**](/scheduling/cron-jobs),
which run your Bijection functions on a recurring schedule. They are useful for
cleanup tasks, periodic reports, or syncing with external services.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { cronJobs } from "bijection/server";
import { internal } from "./_generated/api";

const crons = cronJobs();

// Runs every minute
crons.interval(
  "clear messages table",
  { minutes: 1 },
  internal.messages.clearAll,
);

// Runs daily at 17:00 UTC. Bijection picks the minute to spread
// the load away from the top of the hour.
crons.daily("send reminder", { hourUTC: 17 }, internal.emails.send);

// Runs on the first day of every month at 16:00 UTC,
// passing an argument to the function
crons.monthly(
  "payment reminder",
  { day: 1, hourUTC: 16 },
  internal.payments.sendPaymentEmail,
  { email: "my_email@gmail.com" },
);

export default crons;
```

## Learn More

* [Cron Jobs](/scheduling/cron-jobs)
* [Scheduled Functions](/scheduling/scheduled-functions)
* [`Crons` API reference](/api/classes/server.Crons)
