Docs Installation Scheduled Tasks Reference

Scheduled Tasks Reference

Traffic Exchange Script uses Laravel’s scheduler to run background tasks. A single cron entry is all you need — the scheduler handles the rest.


Required Cron Entry

Add this to your server’s cron (via cPanel or system crontab):

* * * * * cd /path/to/your/script && php artisan schedule:run >> /dev/null 2>&1

Replace /path/to/your/script with the full path to your script installation (the directory containing artisan).

This single cron entry runs every minute. The scheduler internally determines which tasks are due and runs only those.


Full Task Schedule

Command Frequency What It Does
te:check-banner-liveness Hourly Checks that active banner ads’ target URLs are still reachable. Auto-pauses banners with unreachable URLs.
te:check-site-health Every 6 hours Checks that submitted surf sites are reachable via HTTP HEAD. Auto-pauses sites that fail TE_SURF_HEALTH_CHECK_MAX_FAILURES consecutive checks.
te:aggregate-daily-surf-stats Daily at 00:05 Compiles surf statistics for the analytics dashboard.
te:decay-cheat-scores Daily Reduces all positive cheat scores by TE_CHEAT_SCORE_DECAY_RATE (default: 0.5 points/day). Prevents permanent accumulation from minor flags.
te:purge-expired-icons Every 5 minutes Removes expired temporary icon files from storage.
te:clean-expired-bans Daily Lifts temporary and extended surf bans that have passed their duration.
te:purge-unverified Daily Deletes unverified member accounts older than the configured threshold.
te:stale-session-cleanup Every 2 minutes Closes surf sessions that have been idle longer than the configured pause timeout.
te:check-grace-periods Hourly Checks subscription grace periods and triggers dunning retries for past-due subscriptions.
te:reset-daily-counters Daily at 00:00 Resets per-member daily surf counters (auto surf daily limit, etc.) in the configured timezone.
te:grant-monthly-bonuses Daily at 00:15 Awards any configured monthly bonus credits or points to eligible members.
te:deactivate-expired-vacations Hourly Re-activates members whose vacation mode period has ended.
te:cleanup-exports Daily Deletes member data export files that have exceeded the retention period.
te:process-dunning Hourly Retries failed subscription payments during the grace period.
te:process-auto-payouts Hourly Processes approved withdrawal requests automatically (if auto-payouts are enabled).
te:apply-scheduled-downgrades Hourly Downgrades members whose subscriptions have expired after all dunning attempts fail.
te:mature-commissions Hourly Moves commissions that have passed the maturity period from pending to withdrawable.
te:process-rentals Hourly Processes referral rental transactions (if referral rentals are enabled).
te:dispatch-scheduled-newsletters Every minute Sends newsletters and broadcast messages that are scheduled to go out.
te:autoresponder-process Every minute Processes and sends event-triggered autoresponder email sequences.
te:contest-finalize Every 5 minutes Checks for contests that have ended and finalises results / awards prizes.
te:badges-evaluate Daily at 03:00 Evaluates badge eligibility for all members and awards new badges.
te:support-auto-close Daily at 04:00 Automatically closes support tickets that have been inactive for the configured number of days.
te:validate-license Daily Validates your license key against the license server.

One-Time Setup Commands

These commands are run once during installation, not on a schedule:

Command When to Run
php artisan key:generate During initial installation
php artisan migrate --seed During initial installation
php artisan storage:link During initial installation
php artisan te:generate-vapid-keys Once, to set up web push notifications
php artisan te:update-geoip During installation and periodically to keep GeoIP data current

Verifying the Scheduler Is Running

To check which tasks are registered and their next scheduled run:

php artisan schedule:list

To manually trigger the scheduler (useful for testing):

php artisan schedule:run

Check storage/logs/laravel.log for scheduler output and any errors from individual commands.


Troubleshooting

Newsletters not sending: The te:dispatch-scheduled-newsletters command runs every minute. If newsletters are not sending, verify: 1. The cron job is configured and running 2. Mail settings (MAIL_*) in .env are correct 3. Check storage/logs/laravel.log for mail errors

Subscriptions not downgrading: The te:apply-scheduled-downgrades command runs hourly. Verify the cron is running and check the logs.

Cheat scores not decaying: The te:decay-cheat-scores command runs daily. If scores are not decaying, check the scheduler is running and that TE_CHEAT_SCORE_DECAY_RATE is set in .env.

See FAQ — Scheduler for more common issues.

Traffic Exchange Script scheduled tasks cron job management panel
The Scheduled Tasks panel shows all automated cron jobs and their last run times — verify your scheduler is working here.

Screenshots

Traffic Exchange Script admin panel — ad approval queue showing pending ads for review
The Ad Approval Queue — one of several scheduled tasks that process automatically based on your cron configuration.
Previous License Activation Next Going-Live Checklist