Functions > Schedules (CRON)
Functions > Schedules (CRON)Kroxt BaaS SDK v1.0.5

Schedules (CRON)

Schedule function invocations using standard crontab configurations (e.g. `*/5 * * * *` to execute every 5 minutes).

Schedules Panel Features

Configure cron schedules visually inside the dashboard editor. You can view schedule records, enable/disable timers, inspect triggered executions outputs, and execute manual runs to test cron actions.

Schedule Database Cleanser Handler:
cronJob.js
1
2
3
4
5
6
7
8
// CRON Expression: "0 0 * * *" (Every day at midnight)
export default async function handler(context) {
  const { database, logger } = context;

  logger.info("Executing daily cleanup of temporary logs...");
  const col = database.collection("temp_logs");
  // ... execute cleaning logic ...
}