# CHETS Archive System Reference

## Cron Jobs

| Job Name | Schedule | Purpose |
|----------|----------|---------|
| CHETS Daily Archive | `0 7 * * *` (daily 07:00 UTC) | Refresh daily archive |
| CHETS Weekly Archive | `0 8 * * 1` (Monday 08:00 UTC) | Force weekly archive refresh |

## Archive Files

All stored in `/opt/data/vercel-project/assets/archives/`:

| File | Update Frequency | Typical Size |
|------|-----------------|--------------|
| `schedule-site_initial.zip` | Once (manual) | ~1.2 MB |
| `schedule-site_weekly.zip` | Every 7 days | ~1.2 MB |
| `schedule-site_daily.zip` | Every run | ~1.2 MB |
| `archive-manifest.txt` | Every run | ~200 bytes |

## Manual Commands

```bash
# Daily run (from correct directory!)
cd /opt/data/vercel-project && python3 /tmp/schedule_site/scripts/rolling_archive.py

# Force weekly refresh
cd /opt/data/vercel-project && FORCE_WEEKLY=1 python3 scripts/rolling_archive.py

# Force main restore archive refresh
cd /opt/data/vercel-project && FORCE_MAIN_RESTORE=1 python3 scripts/rolling_archive.py

# Verbose output
cd /opt/data/vercel-project && ROLLING_ARCHIVE_VERBOSE=1 python3 scripts/rolling_archive.py
```

## Troubleshooting

- **Archives are 0 bytes or missing**: Check that `ROOT` in the script points to `/opt/data/vercel-project`
- **Archives are gigabytes**: Archive is corrupted — delete and regenerate
- **archive.html not updating**: The script regenerates it on every run; check file permissions
- **Cron not firing**: Check `cronjob list` in Hermes to verify job is enabled
