Skip to content

Add the option to add php parameters when installing magento 2 cron like "php bin/magento cron:install --params="-d max_execution_time=xxx"

License

Notifications You must be signed in to change notification settings

blackbird-agency/magento-2-cron-php-parameters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cron PHP Parameters

Latest Stable Version License: MIT

This module allows you to add PHP parameters on Magento 2 cronjob installation. The free source is available at the GitHub repository.

Setup

Get the package

Zip Package:

Unzip the package in app/code/Blackbird/CronParameters, from the root of your Magento instance.

Composer Package:

composer require blackbird/cronparameters

Install the module

Go to your Magento root, then run the following Magento command:

php bin/magento setup:upgrade

If you are in production mode, do not forget to recompile and redeploy the static resources, or to use the --keep-generated option.

Administrators

When running magento 2 command php bin/magento cron:install" you can add -p="my php parameters" or --params="my php parameters".

  • Running with --params
php bin/magento cron:install --params="-d max_execution_time=xxx"
  • or with -p
php bin/magento cron:install -p="-d max_execution_time=xxx"
  • Results in something like: (by running crontab -l)
* * * * * /usr/bin/php -d max_execution_time=xxx {magentoRoot}/bin/magento cron:run | grep -v "Ran jobs by schedule" >> {magentoLog}/magento.cron.log

Support

Contact

For further information, contact us:

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

That's all folks!

About

Add the option to add php parameters when installing magento 2 cron like "php bin/magento cron:install --params="-d max_execution_time=xxx"

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages