Cron Automation
Tenant cron endpoint runs:
- Low stock checks and alerts
- Payment reminder generation (customer/supplier dues)
- Recurring expense and income creation
1) Set token in `.env`
CRON_SYNC_TOKEN=replace_with_long_random_secret_token
2) Tenant automation URL
https://zbillz-saas.testyoursite.xyz/cron/tenant-automation?token=YOUR_CRON_SYNC_TOKEN
3) Optional credit-balance sync URL
https://zbillz-saas.testyoursite.xyz/cron/sync-customer-credit-balances?token=YOUR_CRON_SYNC_TOKEN
4) Linux crontab (every hour)
0 * * * * curl -fsS "https://zbillz-saas.testyoursite.xyz/cron/tenant-automation?token=YOUR_CRON_SYNC_TOKEN" >/dev/null 2>&1
5) Windows Task Scheduler
powershell -Command "Invoke-WebRequest -UseBasicParsing 'https://zbillz-saas.testyoursite.xyz/cron/tenant-automation?token=YOUR_CRON_SYNC_TOKEN' | Out-Null"
Keep your token secret and use HTTPS in production.