Add automatic lunch feature. Clean up some code.
This commit is contained in:
@@ -4,10 +4,26 @@ 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(
|
||||
// Run at 7:00 AM CST / 8:00 AM CDT
|
||||
// Only on weekdays
|
||||
'Schedule Automatic Lunches',
|
||||
'0 13 * * 1-5',
|
||||
api.statuses.automaticLunch,
|
||||
);
|
||||
|
||||
crons.cron(
|
||||
// Run at 7:00 AM CST / 8:00 AM CDT
|
||||
// Only on weekdays
|
||||
'Schedule Automatic Lunches Test',
|
||||
'25 18 * * 1-5',
|
||||
api.statuses.automaticLunch,
|
||||
);
|
||||
|
||||
crons.cron(
|
||||
'End of shift (weekdays 5pm CT)',
|
||||
// Run at 4:00 PM CST / 5:00 PM CDT
|
||||
// Only on weekdays
|
||||
'0 22 * * 1-5',
|
||||
api.statuses.endOfShiftUpdate,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user