Reference · 02
Commands and timers
Management commands fall into first-install seeds, recurring operations and one-shot diagnostics. systemd timers own host-level scheduling; there is no Celery or Redis.
Install and content
python manage.py migrate
python manage.py seed_perfumz --pages-only
python manage.py setup_store
python manage.py setup_store --check
python manage.py seed_perfumz --products-only
python manage.py seed_perfumz --catalogue-only
python manage.py seed_perfumz
python manage.py seed_perfumz --fresh-pages
python manage.py sync_staff_roles
python manage.py collectstatic --noinputsetup_store is the buyer-facing first-run installer: identity, owner account, optional pages/catalogue and an environment report. seed_perfumz --pages-only is idempotent and creates only the built-in CMS pages and revisions. --products-only creates the five fragrance products with their images and variants. --catalogue-only adds collections, bundles, reviews, media and shipping without users, customers, pages or orders. The full seed additionally creates demo users, customers and orders, so keep it out of production. --fresh-pages replaces page sections with the seed layout; use it deliberately.
Recurring jobs
python manage.py run_scheduled_jobs
python manage.py run_scheduled_jobs --list
python manage.py run_scheduled_jobs --only send_email_campaigns
python manage.py send_email_campaigns --limit 10
python manage.py run_email_automations
python manage.py retry_emails --limit 100
python manage.py retry_webhooks
python manage.py process_cdn_invalidations
python manage.py invalidate_cdn --path /media/2026/11/bottle.jpg
python manage.py send_appointment_reminders
python manage.py send_waitlist_notifications
python manage.py send_analytics_purchases
python manage.py publish_social_posts
python manage.py sync_newsletter --limit 500| Job | Purpose |
|---|---|
send_email_campaigns | Scheduled campaigns, A/B winners and optimal-time queue. |
run_email_automations | Lifecycle journeys. |
retry_emails | Retry failed transactional deliveries. |
retry_webhooks | Retry failed outbound webhooks. |
process_cdn_invalidations | Process pending CloudFront cache invalidations. |
send_appointment_reminders | Complete past appointments and send reminders. |
send_waitlist_notifications | Back-in-stock emails. |
send_analytics_purchases | GA4/Meta purchase events. |
publish_social_posts | Due social posts. |
sync_newsletter | Mailchimp subscriber sync. |
Backups
python manage.py setup_backup_bucket
python manage.py create_backup --confirm --keep 14
python manage.py create_backup --confirm --skip-media --keep 7
python manage.py create_backup --confirm --skip-database --keep 7Backups are manual-only and S3-only. setup_backup_bucket creates and hardens the private bucket once the IAM policy permits it. create_backup stages the dump and media archive in a temporary directory, uploads them to s3://BACKUP_S3_BUCKET/backups/<timestamp>/, and removes the staging files. If BACKUP_S3_BUCKET is missing the command fails closed. Production PostgreSQL backups require pg_dump from postgresql-client.
Push and PWA
python manage.py generate_vapid_keys
python manage.py send_push_notification --helpRun generate_vapid_keys once, store the output in .env, and restart the web service. The push composer is at /dashboard/push/.
systemd timers
systemctl list-timers 'perfumz*'
sudo systemctl start perfumz-jobs.service
journalctl -u perfumz-jobs -n 100 --no-pager| Unit | Schedule | Command |
|---|---|---|
perfumz-jobs.timer | 5 minutes after boot, then every 5 minutes | run_scheduled_jobs |
There is no backup timer. Backups are triggered manually from the dashboard or with create_backup.
Diagnostics
python manage.py check
python manage.py check --deploy --settings config.settings_production
python manage.py makemigrations --check --dry-run
python manage.py showmigrations
python manage.py test
.venv/bin/python scripts/audit_ui_translations.pyUse check --deploy as a release gate. It must report no warnings; deploy/verify.sh exercises the same settings through Gunicorn.