Summary
The lab status (open / closed) is currently set entirely through chat commands (bot lab is open, bot lab is closed). There's no automatic behavior — if someone forgets to set it to closed at night, it stays stale.
Problem
- Lab status can remain
open long after the lab has closed, giving members incorrect information.
- Someone has to remember to manually update it every night.
Proposed behavior
- Use a scheduled task (cron-style) to automatically set the lab status to
closed at 2:00 AM IST daily.
- The bot should send a message to the designated channel when it does so, e.g.:
🕐 Lab is now closed (auto-updated at 2:00 AM).
- The existing manual commands (
bot lab is open, bot lab is closed) continue to work as before and override the auto-status until the next scheduled reset.
Implementation notes
- The project already depends on
node-cron — use it to schedule the task on bot startup.
- The timezone should be
Asia/Kolkata (already set in the Docker environment).
- The cron expression for 2:00 AM IST daily:
0 2 * * *.
Acceptance criteria
Summary
The lab status (
open/closed) is currently set entirely through chat commands (bot lab is open,bot lab is closed). There's no automatic behavior — if someone forgets to set it to closed at night, it stays stale.Problem
openlong after the lab has closed, giving members incorrect information.Proposed behavior
closedat 2:00 AM IST daily.bot lab is open,bot lab is closed) continue to work as before and override the auto-status until the next scheduled reset.Implementation notes
node-cron— use it to schedule the task on bot startup.Asia/Kolkata(already set in the Docker environment).0 2 * * *.Acceptance criteria
closedat 2:00 AM IST every day.bot lab is openafter 2:00 AM correctly overrides the status until the next night.