Cron. General Presentation

    What is Cron?

    In your site Control Panel, it is possible to configure the automatic launch of the PHP program at a determined time:

    If you configure Crontab to launch the admin/cron.php program, which is part of the plugin, the plugin will be able to download the price list at a certain time from URL or via FTP and process it according to the supplier form settings.

    This way the product prices and quantities are updated automatically without human intervention. It is enough to specify the path to the file on the server in the settings: and the frequency of Crontab start:

    Please don't ask us how to set the path to the file correctly: each hosting does it differently, it's better to ask the hosting technical support.

    A Crontab job on the server is an "alarm clock" that periodically runs the cron.php plugin program. On this, the functions of Crontab end, the program cron.php does the rest of the work.

    The cron.php program may not start if:

    • the time set in the supplier form settings has not come
    • the supplier form is busy processing the price list,

    but Crontab will every minute or every 5 minutes keep trying to run the program so that if timeout occurs to push the plugin to work further.

    Notice 1

    If Crontab is configured to start every 5 minutes, there will be a 5-minute pause in case of a timeout. When processing a large price list, If there are 10 timeouts, 50 minutes will be lost.

    Notice 2

    The cron.php program can be run manually (used for debugging) from the browser's address bar:

    Therefore, it is recommended to rename the cron.php file to something different (only known to you) so that a third party cannot run it.

    For example:  cron121212.php

    Work algorithm summary:

    • Crontab starts the program admin/cron.php
    • cron.php checks which supplier form should be running at a given time
    • Downloads the price list and if the price list is downloaded successfully, consecutively executes the tasks specified in the supplier form in the "Cron" tab.

    Usergio Copyright © 2022