Skip to main content
The Laravel scheduler handles periodic tasks such as:
  • Sending service expiration reminder emails
  • Suspending overdue services
  • Resetting monthly bandwidth counters
  • Cleaning up expired WireGuard configurations

Cron job setup

Add a single cron entry that runs every minute:
sudo crontab -e -u www-data
Add this line:
* * * * * cd /var/www/startmyvpn && php artisan schedule:run >> /dev/null 2>&1
This is the only cron entry you need. Laravel’s scheduler internally dispatches all timed tasks.

Verify the scheduler is running

php artisan schedule:list
This shows all registered scheduled commands and their next run time.

Test locally

php artisan schedule:work
This runs the scheduler in the foreground, executing due commands every minute — useful during development.