Skip to content

Scheduled Tasks

Some of your store's work happens on a timetable or in the background, not at the moment you click a button. Catalog rule prices are refreshed every night, campaigns go out once a day, and emails can wait in a queue before they're sent. For this to work, the server your store runs on needs two things set up.

You don't set these up in the admin panel. Ask your developer or hosting provider to check both when the store goes live.

What your server needs

  • The scheduler. The server runs Bagisto's scheduler every minute, and the scheduler starts each task below at its time.
  • A queue worker, if the store uses a queue. A store can hand slow work, such as sending emails, to a background queue so pages stay fast. When it does, a queue worker must keep running to process that work. When the store doesn't use a queue, this work happens straight away and no worker is needed.

Tasks that run on a timetable

What happensWhenPage
Catalog rule prices are recalculated, so rules start and stop on the right daysEvery night, just after midnightCatalog Rules
Product prices used for sorting and filtering are refreshedEvery night, just after midnightCatalog Rules
Campaigns whose event date has arrived are sentOnce a day, at midnightCampaigns
Reminder emails go out for overdue invoicesOnce a day, at 3:00Invoice Settings
Product prices are recorded for the lowest-price disclosure, and old records are clearedEvery 15 minutes, and a clean-up once a dayOmnibus Price Disclosure
Exchange rates are updated from your rates providerOnly when Scheduled Import is switched on, daily, weekly or monthly at the time you chooseExchange Rates

Times follow your store's time zone.

Work that goes through the queue

When your store uses a queue, these wait for the queue worker:

  • every email the store sends, including order, invoice, customer and campaign emails;
  • updating the prices and stock that catalog rules and the storefront use after you save a product or a rule;
  • indexing products for an external search engine such as Elasticsearch. See Search Engines;
  • recording what shoppers search for. See Search Terms;
  • running imports. See Data Transfer;
  • building sitemap files. See Sitemaps;
  • sending guests the link to their EU withdrawal request. See EU Withdrawal.

Signs that something isn't running

What you noticeWhat's probably not running
Emails arrive late or not at allThe queue worker
A catalog rule's discount doesn't appear or doesn't end on timeThe scheduler
A campaign never goes outThe scheduler, and the queue worker if the store uses a queue
A sitemap file isn't created after you save itThe queue worker
An import stays at the same stepThe queue worker
Exchange rates stay the same after their scheduled timeThe scheduler

If you notice any of these, ask your developer or hosting provider to check that the scheduler runs every minute and that the queue worker is running.

Released under the MIT License.