virtualMachinemagento

Configure scheduled tasks

Magento cron tasks are enabled for cloud images by default. Check if they are working by running this command:

$ sudo cat /etc/crontab

The output should contain these lines if they are enabled:

* * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento-cli cron:run -vvv 2>&1 >> /opt/bitnami/apps/magento/htdocs/var/log/magento-cron.log #magento-cron
* * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/update/cron.php 2>&1 >> /opt/bitnami/apps/magento/htdocs/var/log/magento-update-cron.log #magento-update-cron
* * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento-cli setup:cron:run -vvv 2>&1 >> /opt/bitnami/apps/magento/htdocs/var/log/magento-setup-cron.log #magento-setup-cron

If you wish to disable it, just follow the steps below:

  • Edit the /etc/crontab file:

    $ sudo nano /etc/crontab
    
  • Comment the following lines:

    #* * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento cron:run
    #* * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/update/cron.php
    #* * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento setup:cron:run
    
  • Save the file and exit.