I am unable to setup cron job. I have installed Magento CE 2.1.4 and had tried to setup cron job through cpanel.

I have used this command for cronjob :

* * * * * wget  -o  -q http://www.domain.com/public_html/cron.php

I keep getting this error in mail :

/bin/bash: /dev/: Is a directory

Please help. I am new to magento and am unable to understand how to set it up and also how to set success messages to my mail.

Thanks in advance

1 Answer 1


You are attempting to run Magento 2 cron in the same method as Magento 1.x which is the issue. Magento 2 requires the following 3 commands to run in a production environment:

php /home/example/example.com/html/bin/magento cron:run

php /home/ example/example.com/html/update/cron.php

php /home/example/example.com/html/bin/magento setup:cron:run

php is referencing the php user for the store. Make sure the update "/home/example..." with the local environment.

Magento's full documentation on cron setup can be found at http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html

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.