#!/bin/bash
crontab -l > /tmp/crontab.bak
{ crontab -l; printf "\n# Auto-homepage (daily 6am)\n0 6 * * * cd /var/www/sneakerpicks && npx tsx scripts/update-homepage.ts >> /var/log/sneakerpicks/update-homepage.log 2>&1\n\n# Auto-deals (daily 6:15am)\n15 6 * * * cd /var/www/sneakerpicks && npx tsx scripts/update-deals.ts >> /var/log/sneakerpicks/update-deals.log 2>&1\n"; } | crontab -
echo "Cron jobs added"
crontab -l | tail -6
