0

How i magento perform schedule update programmatically.

  1. which module i check, how magento perform schedule update ?
  2. please narrate which file work ?

1 Answer 1

0

Magento manage its schedule joob via cronjob.

If you will create a custom module and define that your code will run in the schedule then you need to add your code to Magento cron job

Please follow the below article for how you can define a custom cronjob for the requirement:

See below example:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="vendorname_modulename_cron_somecronmodel" instance="VendorName\ModuleName\Cron\Cronfile" method="execute">
            <schedule>* * * * *</schedule>
        </job>
     </group>
</config>

As per our requirement, you need to write your product update code to VendorName\ModuleName\Cron\Cronfile.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.