# StartupLX Cron Schedule Configuration

## Daily Cron Jobs (Hetzner VPS)

Add to crontab: `crontab -e`

```bash
# Morning Brief - 6:00 AM EAT
0 6 * * * cd /home/cyprian/Documents/2026/startuplx && /usr/local/bin/hermes --profile=antigravity "Daily priority scan: check revenue, pipeline, website status" >> /var/log/startuplx/morning.log 2>&1

# Progress Update - 3:00 PM EAT  
0 15 * * * cd /home/cyprian/Documents/2026/startuplx && bash scripts/progress-check.sh >> /var/log/startuplx/progress.log 2>&1

# Nightly Sync - 9:00 PM EAT
0 21 * * * cd /home/cyprian/Documents/2026/startuplx && hermes --profile=antigravity "Update project tracker with today's progress and prep tomorrow's tasks" >> /var/log/startuplx/nightly.log 2>&1

# Weekly Review - Sunday 7:00 AM EAT
0 7 * * 0 cd /home/cyprian/Documents/2026/startuplx && hermes --profile=antigravity "Weekly business review: revenue $7000 target, pipeline analysis, automation status" >> /var/log/startuplx/weekly.log 2>&1
```

## Priority-Based Task Filtering

### When You Ask: "What's Today's Priority?"
The system will:
1. Scan soul.md for project vision
2. Check project-tracker.md for current goals
3. Read daily-outreach-tracking.csv for pipeline value
4. Query Metabase dashboard for revenue progress
5. Return ranked priorities by revenue impact

### Priority Output Format
```
🎯 TODAY'S PRIORITY (Revenue: $___/$200)

🔴 HIGHEST ($200 today)
- Send 5 outreach emails
- Deploy contact page
- Schedule 2 calls

🟡 HIGH ($400 this week)
- Close 1 project
- Launch booking
- Test invoicing

🟢 MEDIUM ($7000/month goal)
- Build full website
- Initialize dashboard
- Set up alerts
```

---

## Environment Setup

### Create Log Directory
```bash
mkdir -p /var/log/startuplx
chmod 755 /var/log/startuplx
```

### Install Hermes Cron Wrapper
```bash
# Create wrapper script
cat > /usr/local/bin/startuplx-cron << 'EOF'
#!/bin/bash
cd /home/cyprian/Documents/2026/startuplx
exec /usr/local/bin/hermes --profile=antigravity "$@"
EOF

chmod +x /usr/local/bin/startuplx-cron
```

### Cron Environment Variables
```bash
# Add to crontab header (crontab -e)
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MAILTO=infostartuplx@gmail.com
```

---

## Automation Triggers

### Revenue Milestone Alerts
```bash
# Check at 10 AM daily
0 10 * * * cd /path/to/startuplx && psql -c "SELECT revenue_check()" | mail -s "Revenue Alert" infostartuplx@gmail.com
```

### Website Uptime Monitor
```bash
# Check every 5 minutes
*/5 * * * * curl -f https://startuplx.com > /dev/null || echo "Website down" | mail -s "Uptime Alert" infostartuplx@gmail.com
```

### Backup Schedule
```bash
# Daily database backup at 11:30 PM
30 23 * * * pg_dump startuplx > /backups/startuplx-$(date +\%F).sql
```

---

## Monitoring Dashboard

### Log Files
- `/var/log/startuplx/morning.log` - Daily briefings
- `/var/log/startuplx/progress.log` - Progress checks
- `/var/log/startuplx/nightly.log` - Nightly syncs
- `/var/log/startuplx/weekly.log` - Weekly reviews

### Status Check Command
```bash
# Add alias
alias xstatus='tail -50 /var/log/startuplx/nightly.log'
alias xincome='psql -c "SELECT * FROM revenue_dashboard LIMIT 10;"'
```