magento2.3 定时任务问题

2.04K 浏览M2交流区magento2.3 定时任务

magento2.3 定时任务问题

magento2 怎么把定时任务 关闭一部分不使用

已回答
0

群主是采用了官方的指导方法,非常好,重写时,

etc/module.xml

里面稍微要注意一下

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Amitshree_Mymodule" setup_version="1.0.0">
<sequence>
<module name="Magento_Indexer"/>
</sequence>
</module>
</config>

这里要重新  Magento_Indexer 里面的计划 ,所以,要用 <sequence> 指明一下

还有一个方法:

装 https://github.com/Ethan3600/magento2-CronjobManager  可以系统管理 计划任务

编辑回答
0

参考

https://devdocs.magento.com/guides/v2.4/config-guide/cron/custom-cron-ref.html#disable-cron-job

主要原理是在你自己的插件里改写需要disable的定时任务,把这个定时的时间改成一个不存在的时间,所以就永远没法执行了,比如改成2月30号。

已回答
0