Contents

    Managing Cron

    Your task/initial situation

    You would like JTL-Shop to carry out background tasks that ensure the smooth operation of your online shop. These tasks should be done at a time that suits you well, so you want to specify the time and frequency.

    Cron tasks

    Cron tasks allow you to carry out scheduled background tasks. This avoids resource-intensive processes during peak times.

    The Cron page is accessible via Administration > System > Cron.

    Please note: This is only a pseudo Cron method that may in some cases work unreliably since the tasks are only executed when the online shop is called up. With real Cron jobs, scheduled tasks are processed in set time intervals. Please contact your hosting provider if you would like to use real server-based Cron tasks.

    Overview of queue entries

    Queue entries are a list of all Cron jobs that still need to be carried out.
    By default, two task types have already been created:

    • Anonymisation of customer data: This type comprises several GDPR-related processes. Every 24 hours, unused personal data is deleted. This can be, for example, old data related to guest orders or already processed customer queries via the contact form.
    • Licence checks: This task type updates your purchases carried out via the JTL-Extension Store every 4 hours.

    When you create further entries, they will also be listed here.

    Creating a new queue entry

    You can add more entries to the existing ones.

    1. Switch to the tab Create queue entry.
    2. Under Type, select the desired task.
    • Image cache: Normally, images are only loaded in the required size when a customer opens the respective item in the front end. This lead to short but noticeable waiting times when an image is called up for the first time. To avoid this, you can store all required sizes in the image cache automatically.
    • Status emails: Specify how often system emails with information on the status of your online shop are to be sent to you.
    • Anonymisation of customer data: Here you can edit the preset task type Anonymisation of customer data.
    1. Into Frequency, enter how many hours the interval for this Cron task should be.
    2. Enter the desired Start date and Start time. For tasks that take a lot of resources, we recommend scheduling the Cron task for some time during the night when there will probably be very few visitors present. Ideally, the start time should be just after the nightly backup.

    Settings

    In the settings, you can activate the execution of the freshly created Cron taks and specify when it will be triggered.

    1. Switch to the Settings tab.
    2. If you have not already done so, activate the setting Pseudo Cron Method to make sure the Cron tasks will be carried out accordingly.
    3. For Start server-to-server with every Xth call, specify the interval in which the created Cron jobs are to be triggered in the queue. The more visitors there are in your online shop, the higher the value should be.
    Example: You created a Cron task of the type Customer data anonymisation and set a start time of 00:00 and a frequency of 24 hours. Pseudo Cron is enabled and Start server-to-server with every Xth call is set to 10. With every tenth request to your online shop, e.g. by visitors or bots, JTL-Shop checks for open queue entries. If some are found, the shop checks whether the conditions for the start time and frequency are met. If yes, the corresponsing entries will be processed.