Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 931 Bytes

cron-jobs.rst

File metadata and controls

30 lines (19 loc) · 931 Bytes

How to prepare simple CRON jobs?

What are CRON jobs?

This is what we call scheduling repetitive task on the server. In web applications this will be mainly repetitively running specific commands.

CRON jobs in Sylius

Sylius has two vital, predefined commands designed to be run as cron jobs on your server.

  • sylius:remove-expired-carts - to remove carts that have expired after desired time
  • sylius:cancel-unpaid-orders - to cancel orders that are still unpaid after desired time

The recommended configuration

0 */6 * * * sh php bin/console sylius:remove-expired-carts
0 */6 * * * sh php bin/console sylius:cancel-unpaid-orders

How to configure a CRON job ?

Tip

Learn more here: Cron and Crontab usage and examples.