// convex/crons.ts
import { cronJobs } from 'convex/server';
import { api } from './_generated/api';

const crons = cronJobs();

// Runs at 5:00 PM America/Chicago, Monday–Friday.
// Convex will handle DST if your project version supports `timeZone`.
crons.cron(
  'End of shift (weekdays 5pm CT)',
  '0 22 * * 1-5',
  api.statuses.endOfShiftUpdate,
);

export default crons;
