Cron & Queue

Paymery relies on Laravel's scheduler and queue system for background tasks such as emails, notifications, billing status updates, and periodic maintenance jobs. This section explains how to configure cron and queue workers based on your hosting type.

Cron Job (Laravel Scheduler)

The Laravel scheduler must be executed regularly to run scheduled tasks. The recommended approach depends on your hosting environment.

Shared Hosting

On shared hosting, you usually do not have access to Supervisor or system services. Instead, you can configure cron jobs directly from your hosting control panel (cPanel, Plesk, or similar).

It is recommended to run the Laravel scheduler every 5 minutes on shared hosting to reduce resource usage.

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

Replace /path-to-your-project with the absolute path to your application directory.

VPS

On a VPS, you have full control over system services. The recommended setup is to run the Laravel scheduler every minute.

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

Queue Worker

Queue workers process background jobs such as emails and notifications. How you run the queue worker depends on your hosting environment.

Shared Hosting

Since shared hosting does not support Supervisor, you can run the queue worker using a cron job.

It is recommended to run the queue worker every 1 minute.

* * * * * cd /path-to-your-project && php artisan queue:work --stop-when-empty --tries=3 >> /dev/null 2>&1

This approach ensures queued jobs are processed regularly without keeping a long-running process.

VPS (Recommended)

On a VPS, it is strongly recommended to use Supervisor (or a similar process manager) to keep the queue worker running continuously.

Example queue worker command:

php artisan queue:work --tries=3

Supervisor ensures the worker restarts automatically if it stops and provides better performance for production environments.

Common Production Notes

  • Ensure APP_ENV=production and APP_DEBUG=false.
  • HTTPS is required for billing features and Stripe webhooks.
  • Verify writable permissions for storage and bootstrap/cache.
  • If you are using Redis or database queues, ensure the connection is configured correctly.
Important
If cron jobs or queue workers are not running, emails, billing updates, and scheduled tasks will not be processed correctly.
© 2026 paymery. Documentation.