feat: add due date reminders functionality with cron jobs and test scripts

This commit is contained in:
2025-12-19 09:54:27 +01:00
parent 8b11dc5083
commit 2b27583c28
7 changed files with 241 additions and 1 deletions

View File

@@ -29,7 +29,12 @@ echo "⏰ Setting up daily backup cron job..."
echo "0 2 * * * cd /app && /usr/local/bin/node backup-db.mjs >> /app/data/backup.log 2>&1" > /etc/cron.d/backup-cron
chmod 0644 /etc/cron.d/backup-cron
crontab /etc/cron.d/backup-cron
service cron start
# Set up daily due date reminders cron job (runs at 3 AM daily)
echo "⏰ Setting up daily due date reminders cron job..."
echo "0 3 * * * cd /app && /usr/local/bin/node send-due-date-reminders.mjs >> /app/data/reminders.log 2>&1" > /etc/cron.d/reminders-cron
chmod 0644 /etc/cron.d/reminders-cron
crontab -l | cat - /etc/cron.d/reminders-cron > /tmp/crontab.tmp && crontab /tmp/crontab.tmp
# Start the application
echo "✅ Starting production server..."